Query time 0.00015
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.018937565,
"filesort": {
"sort_key": "if(shared_descr.product_id is not null,shared_descr.product,descr1.product), products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "const",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "var_val_18",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "variant_id",
"key_length": "6",
"used_key_parts": ["variant_id", "feature_id"],
"loops": 1,
"rows": 4,
"cost": 0.00193929,
"filtered": 50,
"attached_condition": "var_val_18.feature_id <=> 18 and var_val_18.lang_code <=> 'en' and var_val_18.variant_id <=> 92 and var_val_18.lang_code = 'en'",
"using_index": true
}
},
{
"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": ["lvshop.var_val_18.product_id"],
"loops": 2,
"rows": 1,
"cost": 0.00274834,
"filtered": 97.62845612,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)"
}
},
{
"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": ["lvshop.var_val_18.product_id"],
"loops": 1.95256917,
"rows": 1,
"cost": 0.003346001,
"filtered": 98.38056946,
"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'"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "6",
"used_key_parts": ["category_id", "product_id"],
"ref": ["const", "lvshop.var_val_18.product_id"],
"loops": 1.920948617,
"rows": 1,
"cost": 0.002537373,
"filtered": 100
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["lvshop.products.company_id"],
"loops": 1.920948617,
"rows": 1,
"cost": 0.002537373,
"filtered": 100,
"attached_condition": "companies.`status` = 'A'"
}
},
{
"table": {
"table_name": "shared_descr",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "product_id", "company_id"],
"key": "PRIMARY",
"key_length": "13",
"used_key_parts": ["product_id", "lang_code", "company_id"],
"ref": ["lvshop.var_val_18.product_id", "const", "const"],
"loops": 1.920948617,
"rows": 1,
"cost": 0.002537373,
"filtered": 100,
"attached_condition": "trigcond(shared_descr.lang_code = 'en')"
}
},
{
"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": ["lvshop.var_val_18.product_id", "const"],
"loops": 1.920948617,
"rows": 1,
"cost": 0.003291814,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'en')"
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 244 |
Packard Bell OneTwo |
CS-Cart |
P |
0 |