Query time 0.00279
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "40.96"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"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": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
]
}
},
{
"table": {
"table_name": "cscart_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": "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": 80,
"rows_produced_per_join": 80,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.74",
"eval_cost": "8.00",
"prefix_cost": "8.74",
"data_read_per_join": "1K"
},
"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": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "0.40",
"prefix_cost": "36.74",
"data_read_per_join": "17K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`products`.`parent_product_id` = 0) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`company_id` = 1) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`amount` > 0) or (`softwarepirmam_hewadelivard_cscart_4`.`products`.`tracking` = 'D')) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "99.93",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.40",
"prefix_cost": "38.14",
"data_read_per_join": "95"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`prices`.`lower_limit` = 1) and (`softwarepirmam_hewadelivard_cscart_4`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.40",
"prefix_cost": "39.54",
"data_read_per_join": "127"
},
"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": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.02",
"eval_cost": "0.40",
"prefix_cost": "40.96",
"data_read_per_join": "18K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 5215 |
SodaStream Pepsi Zero Sugar Syrup 440ml |
Delivard Store |
P |
0 |
| 5303 |
Giffard Piña Colada Syrup |
Delivard Store |
P |
0 |
| 5360 |
Giffard Caramel Sauce |
Delivard Store |
P |
0 |
| 5311 |
Giffard Blue Curaçao Syrup |
Delivard Store |
P |
0 |
| 5231 |
SodaStream Schwip Schwap Zero Syrup 440ml |
Delivard Store |
P |
0 |
| 5292 |
Giffard Vanilla Syrup |
Delivard Store |
P |
0 |
| 5219 |
SodaStream Red Berry Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5341 |
Giffard Lavender Syrup |
Delivard Store |
P |
0 |
| 5217 |
SodaStream Lemon Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5230 |
SodaStream Lipton Ice Tea Lemon Syrup 440ml |
Delivard Store |
P |
0 |
| 5301 |
Giffard Irish Syrup |
Delivard Store |
P |
0 |
| 5222 |
SodaStream Rockstar Tropical Guava Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5318 |
Giffard Raspberry Syrup |
Delivard Store |
P |
0 |
| 5216 |
SodaStream Lemon-Lime Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5224 |
SodaStream Lipton Ice Tea Peach Zero Syrup 440ml |
Delivard Store |
P |
0 |
| 5302 |
Giffard Coconut Syrup |
Delivard Store |
P |
0 |
| 5342 |
Giffard Rose Syrup |
Delivard Store |
P |
0 |
| 5317 |
Giffard Strawberry Syrup |
Delivard Store |
P |
0 |
| 5324 |
Giffard Peach Syrup |
Delivard Store |
P |
0 |
| 5298 |
Giffard Hazelnut Syrup |
Delivard Store |
P |
0 |
| 5305 |
Giffard Lemon Tea Syrup |
Delivard Store |
P |
0 |
| 5227 |
SodaStream 7Up Zero Sugar Syrup 440ml |
Delivard Store |
P |
0 |
| 5293 |
Giffard Caramel Syrup |
Delivard Store |
P |
0 |
| 5322 |
Giffard Pink Grapefruit Syrup |
Delivard Store |
P |
0 |
| 5310 |
Giffard Mango Syrup |
Delivard Store |
P |
0 |
| 5343 |
Giffard Bubble Gum Syrup |
Delivard Store |
P |
0 |
| 5320 |
Giffard Blueberry Syrup |
Delivard Store |
P |
0 |
| 5229 |
SodaStream Cola Syrup 440ml |
Delivard Store |
P |
0 |
| 5299 |
Giffard Toffee Nut Syrup |
Delivard Store |
P |
0 |
| 5319 |
Giffard Cranberry Syrup |
Delivard Store |
P |
0 |
| 5294 |
Giffard Salted Caramel Syrup |
Delivard Store |
P |
0 |
| 5325 |
Giffard Melon Syrup |
Delivard Store |
P |
0 |
| 5306 |
Giffard Ice Black Tea |
Delivard Store |
P |
0 |
| 5220 |
SodaStream Passion Fruit Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5321 |
Giffard Blackberry Syrup |
Delivard Store |
P |
0 |
| 5221 |
SodaStream Rockstar Original Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5362 |
Giffard Dark Chocolate |
Delivard Store |
P |
0 |
| 5226 |
SodaStream Mirinda Syrup 440ml |
Delivard Store |
P |
0 |
| 5300 |
Giffard Cinnamon Syrup |
Delivard Store |
P |
0 |
| 5225 |
SodaStream Pepsi Syrup 440ml |
Delivard Store |
P |
0 |
| 5223 |
SodaStream Orange Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5345 |
Giffard Kiwi Syrup |
Delivard Store |
P |
0 |
| 5351 |
Giffard Strawberry Fruit for Mix |
Delivard Store |
P |
0 |
| 5295 |
Giffard Chocolate Syrup |
Delivard Store |
P |
0 |
| 5323 |
Giffard Blood Orange Syrup |
Delivard Store |
P |
0 |
| 5228 |
SodaStream Cola Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5347 |
Giffard Mint Syrup |
Delivard Store |
P |
0 |
| 5218 |
SodaStream Pink Grapefruit Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5314 |
Giffard Pistachio Syrup |
Delivard Store |
P |
0 |
| 5304 |
Giffard Peach Tea Syrup |
Delivard Store |
P |
0 |
| 5357 |
Giffard Peach Fruit for Mix |
Delivard Store |
P |
0 |
| 5296 |
Giffard Sugar Cane Syrup |
Delivard Store |
P |
0 |
| 5355 |
Giffard Pineapple Fruit for Mix |
Delivard Store |
P |
0 |
| 5232 |
SodaStream Cherry Sugar-Free Syrup 440ml |
Delivard Store |
P |
0 |
| 5361 |
Giffard White Chocolate |
Delivard Store |
P |
0 |
| 5327 |
Giffard Lychee Syrup |
Delivard Store |
P |
0 |
| 5340 |
Giffard Grenadine Syrup |
Delivard Store |
P |
0 |
| 5354 |
Griffard Mango Fruit for Mix |
Delivard Store |
P |
0 |
| 5315 |
Giffard Lemonade Base Syrup |
Delivard Store |
P |
0 |
| 5353 |
Giffard Mix Berries Fruit for Mix |
Delivard Store |
P |
0 |
| 5308 |
Giffard Pineapple Syrup |
Delivard Store |
P |
0 |
| 5312 |
Giffard Mojito Syrup |
Delivard Store |
P |
0 |
| 5326 |
Griffard Watermelon Syrup |
Delivard Store |
P |
0 |
| 5316 |
Giffard Lime Syrup |
Delivard Store |
P |
0 |
| 5344 |
Giffard Green Apple Syrup |
Delivard Store |
P |
0 |
| 5356 |
Giffard Passion fruit Fruit for Mix |
Delivard Store |
P |
0 |
| 5359 |
Giffard Strawberry & Berry |
Delivard Store |
P |
0 |
| 5339 |
Giffard Cherry Syrup |
Delivard Store |
P |
0 |
| 5350 |
Giffard Fruit for Mix Kiwi |
Delivard Store |
P |
0 |
| 5313 |
Giffard Lemon Syrup |
Delivard Store |
P |
0 |
| 5349 |
Giffard Sour Apple Fruit For Mix |
Delivard Store |
P |
0 |
| 5352 |
Giffard Blueberry Fruit for Mix |
Delivard Store |
P |
0 |
| 5358 |
Giffard Banana Fruit for Mix |
Delivard Store |
P |
0 |
| 5307 |
Giffard Passion Fruit Syrup |
Delivard Store |
P |
0 |
| 5348 |
Giffard Icemint Syrup |
Delivard Store |
P |
0 |
| 5337 |
Giffard Blueberry Blue Syrup |
Delivard Store |
P |
0 |
| 5338 |
Giffard Pomegranate Syrup |
Delivard Store |
P |
0 |
| 5297 |
Giffard Chocolate Cookie Syrup |
Delivard Store |
P |
0 |