Query time 0.01350
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "386.78"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "inventory",
"access_type": "system",
"possible_keys": [
"pc"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "976"
},
"used_columns": [
"product_id",
"amount"
]
}
},
{
"table": {
"table_name": "q_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.20",
"prefix_cost": "0.00",
"data_read_per_join": "2K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 531,
"rows_produced_per_join": 531,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "14.25",
"eval_cost": "106.20",
"prefix_cost": "120.45",
"data_read_per_join": "8K"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"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": [
"portal.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 470,
"filtered": "88.70",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "94.20",
"prefix_cost": "226.65",
"data_read_per_join": "2M"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"timestamp",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`portal`.`products`.`parent_product_id` = 0) and (case `portal`.`products`.`tracking` when 'O' then <cache>((NULL > 0)) when 'B' then (`portal`.`products`.`amount` > 0) else 1 end) and ((`portal`.`products`.`usergroup_ids` = '') or find_in_set(0,`portal`.`products`.`usergroup_ids`) or find_in_set(1,`portal`.`products`.`usergroup_ids`)) and (`portal`.`products`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"portal.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 47,
"filtered": "10.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "9.42",
"prefix_cost": "320.85",
"data_read_per_join": "260K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`portal`.`companies`.`status` = 'A')"
}
},
{
"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": [
"portal.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 47,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "9.42",
"prefix_cost": "330.26",
"data_read_per_join": "179K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"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": [
"portal.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 47,
"filtered": "99.95",
"using_index": true,
"cost_info": {
"read_cost": "47.10",
"eval_cost": "9.42",
"prefix_cost": "386.78",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`portal`.`prices`.`lower_limit` = 1) and (`portal`.`prices`.`usergroup_id` in (0,0,1)))"
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
product_type |
parent_product_id |
32877 |
Creative Mesh Band Women's Gold Watch - S15036L-2 |
Jubilee Store LLC |
P |
0 |
32878 |
Creative Mesh Band Women's Rose Watch - S15036L-3 |
Jubilee Store LLC |
P |
0 |
30350 |
Y&D Women'S A Line Hollow Out Short Sleeve Floral Patchwork Flower Decor Solid Color Dress Pink Color |
J D F General Trading LLC |
P |
0 |
14312 |
Acunion Clasp Band With Butterfly Deployant Buckle Leatherg |
Exborders FZE |
P |
0 |
14348 |
Topwell Black Pocket Watch Roman Pattern Quartz Roman Pocket Watch |
Exborders FZE |
P |
0 |
15787 |
The Unemployed Philosophers Guild Lewis Carroll Alice In Wonder, Unisex Watch |
Exborders FZE |
P |
0 |
16532 |
Calvin Klein Pure Women's Quartz Watch |
Exborders FZE |
P |
0 |
16533 |
Sinobi Leather Strap Watches, Unisex Stopwatch Rose Gold For Men |
Exborders FZE |
P |
0 |
16536 |
FQ-043 Classic Golden Stainless Steel Crystals Quartz |
Exborders FZE |
P |
0 |
16541 |
Empress Stella Automatic Semi-Skeleton Dial Leather-Band Watch - Gold/White/Brown |
Exborders FZE |
P |
0 |
16542 |
Bertha Madeline MOP Bracelet Watch Gold BTHBR7102 |
Exborders FZE |
P |
0 |
16543 |
Timex World Time White Dial Men's Watch T2N613 |
Exborders FZE |
P |
0 |
16553 |
Sinobi Crystal Women Lady Black Quartz Leather Wrist Quartz Watch Cool Snb023 |
Exborders FZE |
P |
0 |
16554 |
White Globe Dial Automaitc Unisex Brown Silver Wrist Watch |
Exborders FZE |
P |
0 |
16555 |
Womens Rhinestone Accented Large Face Bracelet Watch In Gold-Tone Jade LeBaum - JB202729G |
Exborders FZE |
P |
0 |
16556 |
Caravelle New York Women's Stainless Steel Swarovski Crystal-Accented Watch |
Exborders FZE |
P |
0 |