Query time 0.02632
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 127.8773629,
"filesort": {
"sort_key": "descr1.product, products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"loops": 1,
"rows": 7,
"cost": 0.01296265,
"filtered": 100,
"attached_condition": "cscart_categories.category_id in (287,288,289,450,304,305,448) and (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": 7,
"rows": 4107,
"cost": 4.72136679,
"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": 28749,
"rows": 1,
"cost": 29.77912596,
"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": 28749,
"rows": 1,
"cost": 25.71589396,
"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": 28749,
"rows": 1,
"cost": 39.31461396,
"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": "product_id",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["u985510652_ecartify.products_categories.product_id"],
"loops": 28749,
"rows": 1,
"cost": 28.33339954,
"filtered": 100,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)",
"using_index": true
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 439645 |
Max Router 171 |
ACME Corp |
P |
0 |
| 401030 |
Max Router 479 |
ACME Corp |
P |
0 |
| 435106 |
Max Router 532 |
ACME Corp |
P |
0 |
| 401667 |
Max Router 612 |
ACME Corp |
P |
0 |
| 431036 |
Max Router 655 |
ACME Corp |
P |
0 |
| 442622 |
Max Router 727 |
ACME Corp |
P |
0 |
| 435820 |
Max Router 761 |
ACME Corp |
P |
0 |
| 452529 |
Max Router 848 |
AutoZone |
P |
0 |
| 426624 |
Max Router 938 |
AutoZone |
P |
0 |
| 403050 |
Max Shirt 138 |
ACME Corp |
P |
0 |
| 452048 |
Max Shirt 177 |
AutoZone |
P |
0 |
| 407841 |
Max Shirt 261 |
AutoZone |
P |
0 |
| 405943 |
Max Shirt 348 |
ACME Corp |
P |
0 |
| 459502 |
Max Shirt 465 |
AutoZone |
P |
0 |
| 431667 |
Max Shirt 466 |
ACME Corp |
P |
0 |
| 420500 |
Max Shirt 502 |
ACME Corp |
P |
0 |
| 433248 |
Max Shirt 582 |
ACME Corp |
P |
0 |
| 407007 |
Max Shirt 726 |
ACME Corp |
P |
0 |
| 424261 |
Max Shirt 742 |
AutoZone |
P |
0 |
| 442071 |
Max Shirt 770 |
AutoZone |
P |
0 |
| 411571 |
Max Shirt 800 |
AutoZone |
P |
0 |
| 430068 |
Max Shirt 872 |
ACME Corp |
P |
0 |
| 446914 |
Max Sneakers 148 |
ACME Corp |
P |
0 |
| 420739 |
Max Sneakers 275 |
AutoZone |
P |
0 |
| 441207 |
Max Sneakers 348 |
ACME Corp |
P |
0 |
| 438933 |
Max Sneakers 353 |
ACME Corp |
P |
0 |
| 436348 |
Max Sneakers 378 |
AutoZone |
P |
0 |
| 447332 |
Max Sneakers 414 |
AutoZone |
P |
0 |
| 442119 |
Max Sneakers 504 |
ACME Corp |
P |
0 |
| 424436 |
Max Sneakers 572 |
ACME Corp |
P |
0 |
| 409550 |
Max Sneakers 661 |
AutoZone |
P |
0 |
| 447602 |
Max Sneakers 678 |
AutoZone |
P |
0 |