Query time 0.11548
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 |
| 439616 |
Ultra Watch 859 |
ACME Corp |
P |
0 |
| 439621 |
Prime Watch 188 |
ACME Corp |
P |
0 |
| 439635 |
Smart Sneakers 691 |
AutoZone |
P |
0 |
| 439459 |
Lite Shirt 701 |
AutoZone |
P |
0 |
| 439482 |
Max Backpack 299 |
ACME Corp |
P |
0 |
| 439484 |
Smart Sofa 269 |
ACME Corp |
P |
0 |
| 439497 |
Lite Headphones 279 |
ACME Corp |
P |
0 |
| 439503 |
Eco Sneakers 233 |
AutoZone |
P |
0 |
| 439522 |
Classic Shirt 355 |
ACME Corp |
P |
0 |
| 439527 |
Max Sneakers 885 |
ACME Corp |
P |
0 |
| 439533 |
Prime Laptop 867 |
ACME Corp |
P |
0 |
| 439366 |
Classic Mixer 981 |
ACME Corp |
P |
0 |
| 439367 |
Lite Grinder 911 |
AutoZone |
P |
0 |
| 439400 |
Lite Phone 125 |
AutoZone |
P |
0 |
| 439408 |
Eco Grinder 152 |
AutoZone |
P |
0 |
| 439424 |
Prime Grinder 983 |
ACME Corp |
P |
0 |
| 439426 |
Pro Sofa 477 |
ACME Corp |
P |
0 |
| 439427 |
Ultra Camera 445 |
ACME Corp |
P |
0 |
| 439258 |
Pro Headphones 462 |
AutoZone |
P |
0 |
| 439269 |
Prime Phone 314 |
ACME Corp |
P |
0 |
| 439272 |
Classic Drone 318 |
ACME Corp |
P |
0 |
| 439283 |
Prime Watch 117 |
AutoZone |
P |
0 |
| 439284 |
Eco Drone 453 |
ACME Corp |
P |
0 |
| 439310 |
Pro Laptop 909 |
AutoZone |
P |
0 |
| 439312 |
Mini Shirt 763 |
AutoZone |
P |
0 |
| 439320 |
Smart Headphones 452 |
ACME Corp |
P |
0 |
| 439332 |
Eco Mixer 469 |
AutoZone |
P |
0 |
| 439161 |
Prime Sneakers 360 |
AutoZone |
P |
0 |
| 439162 |
Lite Camera 948 |
AutoZone |
P |
0 |
| 439177 |
Classic Book 900 |
AutoZone |
P |
0 |
| 439184 |
Prime Sofa 890 |
ACME Corp |
P |
0 |
| 439194 |
Prime Chair 645 |
AutoZone |
P |
0 |
| 439201 |
Eco Book 196 |
ACME Corp |
P |
0 |
| 439207 |
Pro Phone 765 |
AutoZone |
P |
0 |
| 439215 |
Pro Drone 690 |
ACME Corp |
P |
0 |
| 439224 |
Prime Grinder 279 |
ACME Corp |
P |
0 |
| 439226 |
Eco Headphones 617 |
ACME Corp |
P |
0 |
| 439228 |
Ultra Sneakers 235 |
ACME Corp |
P |
0 |
| 439044 |
Prime Drone 976 |
ACME Corp |
P |
0 |
| 439049 |
Prime Bottle 216 |
ACME Corp |
P |
0 |
| 439064 |
Eco Headphones 814 |
ACME Corp |
P |
0 |
| 439094 |
Classic Headphones 220 |
AutoZone |
P |
0 |
| 439096 |
Pro Phone 544 |
AutoZone |
P |
0 |
| 439112 |
Pro Drone 700 |
ACME Corp |
P |
0 |
| 439116 |
Smart Drone 369 |
ACME Corp |
P |
0 |
| 438942 |
Pro Shirt 670 |
AutoZone |
P |
0 |
| 438950 |
Eco Camera 146 |
ACME Corp |
P |
0 |
| 438958 |
Eco Backpack 741 |
ACME Corp |
P |
0 |