Query time 0.09249
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 1205.024152,
"filesort": {
"sort_key": "descr1.product, products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100
}
},
{
"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.company_id = 2 and 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": "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 |
| 427837 |
Classic Shirt 133 |
ACME Corp |
P |
0 |
| 433931 |
Classic Shirt 309 |
ACME Corp |
P |
0 |
| 457584 |
Classic Shirt 341 |
ACME Corp |
P |
0 |
| 439522 |
Classic Shirt 355 |
ACME Corp |
P |
0 |
| 404231 |
Classic Shirt 372 |
ACME Corp |
P |
0 |
| 420223 |
Classic Shirt 472 |
ACME Corp |
P |
0 |
| 403855 |
Classic Shirt 610 |
ACME Corp |
P |
0 |
| 453787 |
Classic Shirt 664 |
ACME Corp |
P |
0 |
| 454909 |
Classic Shirt 885 |
ACME Corp |
P |
0 |
| 403015 |
Classic Sneakers 172 |
ACME Corp |
P |
0 |
| 438963 |
Classic Sneakers 179 |
ACME Corp |
P |
0 |
| 450825 |
Classic Sneakers 193 |
ACME Corp |
P |
0 |
| 446646 |
Classic Sneakers 238 |
ACME Corp |
P |
0 |
| 435981 |
Classic Sneakers 249 |
ACME Corp |
P |
0 |
| 434868 |
Classic Sneakers 352 |
ACME Corp |
P |
0 |
| 409956 |
Classic Sneakers 413 |
ACME Corp |
P |
0 |
| 443424 |
Classic Sneakers 416 |
ACME Corp |
P |
0 |
| 427907 |
Classic Sneakers 426 |
ACME Corp |
P |
0 |
| 457801 |
Classic Sneakers 485 |
ACME Corp |
P |
0 |
| 436128 |
Classic Sneakers 745 |
ACME Corp |
P |
0 |
| 436002 |
Classic Sneakers 771 |
ACME Corp |
P |
0 |
| 421748 |
Classic Sneakers 855 |
ACME Corp |
P |
0 |
| 432913 |
Classic Sneakers 860 |
ACME Corp |
P |
0 |
| 421122 |
Classic Sofa 153 |
ACME Corp |
P |
0 |