Query time 0.11088
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 1568.698833,
"filesort": {
"sort_key": "products.`timestamp` desc, products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"loops": 1,
"rows": 99,
"cost": 0.0269918,
"filtered": 100,
"attached_condition": "(cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` in ('A','H') and cscart_categories.storefront_id in (0,1)"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["u985510652_ecartify.cscart_categories.category_id"],
"loops": 99,
"rows": 4107,
"cost": 66.77361603,
"filtered": 100
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["u985510652_ecartify.products_categories.product_id"],
"loops": 406593,
"rows": 1,
"cost": 367.7379133,
"filtered": 100,
"attached_condition": "products.parent_product_id = 0 and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A' and products.product_type <> 'D'"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["u985510652_ecartify.products.company_id"],
"loops": 406593,
"rows": 1,
"cost": 363.6746813,
"filtered": 100,
"attached_condition": "companies.`status` = 'A'"
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "product_id"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["product_id", "lang_code"],
"ref": [
"u985510652_ecartify.products_categories.product_id",
"const"
],
"loops": 406593,
"rows": 1,
"cost": 377.2734013,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'en')"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["u985510652_ecartify.products_categories.product_id"],
"loops": 406593,
"rows": 1,
"cost": 393.2122292,
"filtered": 100,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)"
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 438300 |
Eco Headphones 801 |
ACME Corp |
P |
0 |
| 438310 |
Eco Book 546 |
ACME Corp |
P |
0 |
| 438321 |
Classic Drone 864 |
ACME Corp |
P |
0 |
| 438143 |
Smart Bottle 270 |
AutoZone |
P |
0 |
| 438152 |
Mini Phone 527 |
AutoZone |
P |
0 |
| 438177 |
Pro Chair 983 |
ACME Corp |
P |
0 |
| 438180 |
Smart Mixer 453 |
AutoZone |
P |
0 |
| 438188 |
Pro Sofa 519 |
ACME Corp |
P |
0 |
| 438195 |
Ultra Bottle 454 |
AutoZone |
P |
0 |
| 438212 |
Mini Camera 600 |
ACME Corp |
P |
0 |
| 438218 |
Prime Sofa 754 |
AutoZone |
P |
0 |
| 438052 |
Classic Camera 909 |
AutoZone |
P |
0 |
| 438076 |
Smart Grinder 454 |
ACME Corp |
P |
0 |
| 438086 |
Mini Laptop 666 |
ACME Corp |
P |
0 |
| 438088 |
Pro Bottle 850 |
ACME Corp |
P |
0 |
| 438091 |
Ultra Backpack 498 |
ACME Corp |
P |
0 |
| 438098 |
Classic Watch 266 |
ACME Corp |
P |
0 |
| 438102 |
Lite Sneakers 933 |
ACME Corp |
P |
0 |
| 438114 |
Eco Sneakers 405 |
ACME Corp |
P |
0 |
| 438117 |
Prime Drone 851 |
ACME Corp |
P |
0 |
| 438128 |
Ultra Bottle 221 |
ACME Corp |
P |
0 |
| 438135 |
Max Phone 452 |
AutoZone |
P |
0 |
| 437939 |
Pro Grinder 558 |
AutoZone |
P |
0 |
| 437947 |
Lite Sneakers 188 |
ACME Corp |
P |
0 |
| 437960 |
Ultra Bottle 261 |
ACME Corp |
P |
0 |
| 437962 |
Classic Router 684 |
ACME Corp |
P |
0 |
| 437993 |
Lite Grinder 168 |
AutoZone |
P |
0 |
| 438009 |
Mini Grinder 532 |
ACME Corp |
P |
0 |
| 438012 |
Classic Bottle 295 |
AutoZone |
P |
0 |
| 438027 |
Mini Chair 360 |
ACME Corp |
P |
0 |
| 437839 |
Eco Backpack 794 |
AutoZone |
P |
0 |
| 437842 |
Eco Router 155 |
AutoZone |
P |
0 |
| 437850 |
Max Mixer 457 |
ACME Corp |
P |
0 |
| 437861 |
Classic Headphones 840 |
AutoZone |
P |
0 |
| 437876 |
Ultra Chair 357 |
ACME Corp |
P |
0 |
| 437879 |
Max Laptop 687 |
ACME Corp |
P |
0 |
| 437895 |
Pro Camera 991 |
AutoZone |
P |
0 |
| 437901 |
Eco Mixer 559 |
ACME Corp |
P |
0 |
| 437836 |
Lite Camera 213 |
ACME Corp |
P |
0 |
| 437741 |
Lite Grinder 745 |
ACME Corp |
P |
0 |
| 437755 |
Smart Backpack 168 |
AutoZone |
P |
0 |
| 437768 |
Ultra Router 213 |
AutoZone |
P |
0 |
| 437794 |
Ultra Grinder 299 |
AutoZone |
P |
0 |
| 437811 |
Smart Sofa 802 |
ACME Corp |
P |
0 |
| 437653 |
Pro Camera 937 |
ACME Corp |
P |
0 |
| 437661 |
Smart Mixer 194 |
ACME Corp |
P |
0 |
| 437686 |
Pro Bottle 125 |
AutoZone |
P |
0 |
| 437696 |
Pro Sofa 354 |
ACME Corp |
P |
0 |