Query time 0.07690
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 = 'ar')"
}
},
{
"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 |
| 415843 |
Eco Laptop 584 |
ACME Corp |
P |
0 |
| 426635 |
Eco Laptop 590 |
ACME Corp |
P |
0 |
| 454483 |
Eco Laptop 711 |
ACME Corp |
P |
0 |
| 442900 |
Eco Laptop 713 |
ACME Corp |
P |
0 |
| 441777 |
Eco Laptop 758 |
ACME Corp |
P |
0 |
| 426668 |
Eco Laptop 804 |
ACME Corp |
P |
0 |
| 454832 |
Eco Mixer 113 |
ACME Corp |
P |
0 |
| 445457 |
Eco Mixer 121 |
ACME Corp |
P |
0 |
| 454320 |
Eco Mixer 201 |
ACME Corp |
P |
0 |
| 455896 |
Eco Mixer 215 |
ACME Corp |
P |
0 |
| 403718 |
Eco Mixer 249 |
ACME Corp |
P |
0 |
| 460902 |
Eco Mixer 258 |
ACME Corp |
P |
0 |
| 408640 |
Eco Mixer 272 |
ACME Corp |
P |
0 |
| 423654 |
Eco Mixer 377 |
ACME Corp |
P |
0 |
| 437901 |
Eco Mixer 559 |
ACME Corp |
P |
0 |
| 451860 |
Eco Mixer 576 |
ACME Corp |
P |
0 |
| 447040 |
Eco Mixer 677 |
ACME Corp |
P |
0 |
| 402866 |
Eco Mixer 711 |
ACME Corp |
P |
0 |
| 419169 |
Eco Mixer 776 |
ACME Corp |
P |
0 |
| 440094 |
Eco Mixer 811 |
ACME Corp |
P |
0 |
| 409667 |
Eco Mixer 844 |
ACME Corp |
P |
0 |
| 433404 |
Eco Mixer 851 |
ACME Corp |
P |
0 |
| 420606 |
Eco Mixer 883 |
ACME Corp |
P |
0 |
| 408565 |
Eco Mixer 958 |
ACME Corp |
P |
0 |