Query time 0.00223
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "26.59"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "ushop_categories",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "3K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
]
}
},
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 10,
"rows_produced_per_join": 1,
"filtered": "10.00",
"cost_info": {
"read_cost": "1.51",
"eval_cost": "0.10",
"prefix_cost": "1.61",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`marketplace`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"rows_examined_per_scan": 41,
"rows_produced_per_join": 41,
"filtered": "100.00",
"using_index": true,
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "4.61",
"eval_cost": "4.10",
"prefix_cost": "10.32",
"data_read_per_join": "656"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "((`marketplace`.`products_categories`.`category_id` = 373) and (`marketplace`.`products_categories`.`product_id` <> 519))"
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"marketplace.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "10.25",
"eval_cost": "0.21",
"prefix_cost": "24.67",
"data_read_per_join": "8K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id",
"cp_active_auction_id"
],
"attached_condition": "((`marketplace`.`products`.`company_id` = `marketplace`.`companies`.`company_id`) and (`marketplace`.`products`.`parent_product_id` = 0) and ((`marketplace`.`products`.`amount` > 0) or (`marketplace`.`products`.`tracking` = 'D')) and ((`marketplace`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`marketplace`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`marketplace`.`products`.`usergroup_ids`))) and (`marketplace`.`products`.`status` = 'A') and (`marketplace`.`products`.`product_type` <> 'W') and (`marketplace`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "auctions",
"access_type": "ref",
"possible_keys": [
"product_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "4",
"ref": [
"marketplace.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"index_condition": "<if>(is_not_null_compl(auctions), (`marketplace`.`products_categories`.`product_id` = `marketplace`.`auctions`.`product_id`), true)",
"cost_info": {
"read_cost": "0.51",
"eval_cost": "0.21",
"prefix_cost": "25.38",
"data_read_per_join": "426"
},
"used_columns": [
"product_id",
"users",
"show_on_category"
]
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"marketplace.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "29.77",
"using_index": true,
"cost_info": {
"read_cost": "0.51",
"eval_cost": "0.06",
"prefix_cost": "26.10",
"data_read_per_join": "14"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`marketplace`.`prices`.`lower_limit` = 1) and (`marketplace`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "ushop_users",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"user_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.06",
"prefix_cost": "26.17",
"data_read_per_join": "3K"
},
"used_columns": [
"user_id",
"user_type",
"company_id"
],
"attached_condition": "(<if>(found_match(ushop_users), ((0 <> (case when (`marketplace`.`products`.`cp_active_auction_id` > 0) then (((`marketplace`.`auctions`.`users` = '') or (0 <> find_in_set(0,`marketplace`.`auctions`.`users`))) and (`marketplace`.`auctions`.`show_on_category` = 'Y')) else 1 end)) or (`marketplace`.`ushop_users`.`company_id` = `marketplace`.`companies`.`company_id`)), true) and <if>(is_not_null_compl(ushop_users), ((`marketplace`.`ushop_users`.`company_id` = `marketplace`.`companies`.`company_id`) and (`marketplace`.`ushop_users`.`user_type` = 'V')), true))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"marketplace.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.15",
"eval_cost": "0.06",
"prefix_cost": "26.38",
"data_read_per_join": "19"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"marketplace.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.15",
"eval_cost": "0.06",
"prefix_cost": "26.59",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 517 |
Apple iPhone 4S White |
Ferrequipo |
P |
0 |
| 525 |
Nokia N1 Pad 7.9" Quad-Core 64bit 2.3GHz 2GB 32GB Android 5.0 |
Ferrequipo |
P |
0 |
| 511 |
Crystal Lake Warm Weather Sleeping Bag |
Ferrequipo |
P |
0 |
| 489 |
HP Photosmart Plus e-All-in-One Printer - B210a |
Ferrequipo |
P |
0 |
| 516 |
Apple iPhone 4S Black |
Ferrequipo |
P |
0 |
| 483 |
New Year's Concert 2012 Diverse Wr.Philharmoniker / Jansons,M. / Wr.Sän |
Ferrequipo |
P |
0 |
| 513 |
Everglades Cold Weather Sleeping Bag |
Ferrequipo |
P |
0 |
| 477 |
Guitar Man Album Artwork |
Ferrequipo |
P |
0 |
| 496 |
ASUS CP6230 |
Ferrequipo |
P |
0 |
| 479 |
B.B. King - Original Greatest Hits CD |
Ferrequipo |
P |
0 |
| 509 |
2011 Tycoon |
Ferrequipo |
P |
0 |
| 510 |
2011 Ice Queen |
Ferrequipo |
P |
0 |
| 488 |
HP Scanjet G3110 Scanner |
Ferrequipo |
P |
0 |
| 512 |
White Water™ Cool Weather Sleeping Bag |
Ferrequipo |
P |
0 |
| 478 |
B.B. King One Kind Favor CD Grammy Award Winning CD Manufacturer: Geffen Records Sku: BBK-11ONEKINDFAVORCD Reviewed 2 times |
Ferrequipo |
P |
0 |
| 490 |
HP Officejet Pro 8600 Premium e-All-in-One Printer |
Ferrequipo |
P |
0 |
| 503 |
Samsung Galaxy Tab™ 8.9 (AT&T) |
Ferrequipo |
P |
0 |
| 482 |
New Year's Concert 2011 Diverse Klassik Welser-moest / Wiener Philharmoniker |
Ferrequipo |
P |
0 |
| 514 |
WeatherMaster Screened 6 Tent With Hinged Door |
Ferrequipo |
P |
0 |
| 492 |
Intel® Boxed Intel® Core™ i7-2600 |
Ferrequipo |
P |
0 |
| 507 |
HP 2711x 27" LED Monitor |
Ferrequipo |
P |
0 |
| 521 |
Apple iPod Classic White |
Ferrequipo |
P |
0 |
| 520 |
Apple iPod Classic Black |
Ferrequipo |
P |
0 |
| 502 |
Samsung Galaxy Tab 8.9 (Wi-Fi Only) - 32GB Metallic Gray |
Ferrequipo |
P |
0 |
| 508 |
2011 Pit Boss |
Ferrequipo |
P |
0 |
| 480 |
John Rutter - The Colours of Christmas |
Ferrequipo |
P |
0 |
| 515 |
Elite Evanston 8 Tent |
Ferrequipo |
P |
0 |
| 506 |
LG D2342P-PN |
Ferrequipo |
P |
0 |
| 518 |
Apple® - iPad® with Retina® display Wi-Fi - 64GB - Black |
Ferrequipo |
P |
0 |
| 497 |
ASUS Essentio CP1130 |
Ferrequipo |
P |
0 |
| 505 |
Intel® Core™ i7 Processor i7-950 |
Ferrequipo |
P |
0 |
| 500 |
Series 9 13.3" Laptop |
Ferrequipo |
P |
0 |
| 495 |
Acer 3D Series HN274H bmiiid |
Ferrequipo |
P |
0 |