Query time 0.00571
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "products.`timestamp` desc, products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "war_sum_amount",
"access_type": "system",
"possible_keys": ["PRIMARY"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
}
},
{
"table": {
"table_name": "warehouses_destination_products_amount",
"access_type": "system",
"possible_keys": ["PRIMARY", "idx_storefront_id"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
}
},
{
"table": {
"table_name": "products",
"access_type": "ALL",
"possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
"rows": 67,
"filtered": 79.83960724,
"attached_condition": "products.parent_product_id = 0 and products.company_id in (2,64,92,103,104,121,127,0) and case products.is_stock_split_by_warehouses when 'Y' then NULL else products.amount end > 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": ["ebonza_cscart_test.products.product_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'en')"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["ebonza_cscart_test.products.company_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "companies.`status` = 'A'"
}
},
{
"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": ["ebonza_cscart_test.products.product_id"],
"rows": 1,
"filtered": 90.5405426,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)",
"using_index": true
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["ebonza_cscart_test.products.product_id"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["ebonza_cscart_test.products_categories.category_id"],
"rows": 1,
"filtered": 100,
"index_condition": "cscart_categories.category_id in (18415,18416,18534,18537,18547,18553,18559,18570,18574,18581,18585,18593,18597,18613,18622,18629,18642,18650,18651,18659,18535,18538,18548,18554,18560,18571,18575,18582,18586,18594,18598,18614,18623,18630,18643,18652,18654,18660,18531,18539,18549,18555,18561,18572,18576,18583,18587,18595,18599,18615,18624,18631,18644,18653,18655,18661,18532,18540,18550,18556,18562,18577,18588,18600,18625,18632,18645,18656,18662,18533,18541,18551,18557,18563,18578,18589,18601,18626,18633,18657,18536,18542,18564,18579,18590,18602,18627,18634,18658,18543,18545,18565,18591,18603,18628,18663,18544,18546,18566,18592,18604,18635,18552,18567,18605,18636,18558,18568,18606,18637,18569,18584,18607,18638,18573,18596,18608,18639,18580,18609,18620,18640,18610,18621,18611,18641,18612,18646,18616,18647,18617,18648,18618,18649,18619)",
"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)"
}
}
]
}
}
}
}