Query time 0.00641
JSON explain
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 46,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1896,1894,49873,1057,1716,43824,34667,2238,34666,1895,1715,5547,43823,21780,5548,46737,5556,16607,46735,5554,2113,5551,5553,3470,3469,46739,16601,16612,1754,6529,27350,21600)"
}
},
{
"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": ["dev_db.cscart_products_categories.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "cscart_categories.storefront_id in (0,1) 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')"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "6",
"used_key_parts": ["category_id", "product_id"],
"ref": ["const", "dev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
Result
product_id |
category_ids |
position |
1057 |
210,209,409,160M |
|
1715 |
123M |
|
1716 |
123M |
|
1754 |
183M |
|
1894 |
409,196M |
|
1895 |
315,212,409,196M |
|
1896 |
409,196M |
|
2113 |
123M |
|
2238 |
123M |
|
3469 |
123M |
|
3470 |
123M |
|
5547 |
123M |
|
5548 |
123M |
|
5551 |
123M |
|
5553 |
123M |
|
5554 |
123M |
|
5556 |
123M |
|
6529 |
95,119,118M |
|
16601 |
123M |
|
16607 |
123M |
|
16612 |
123M |
|
21600 |
120M |
|
21780 |
120M |
|
27350 |
123M |
|
34666 |
122M |
|
34667 |
122M |
|
43823 |
122M |
|
43824 |
122M |
|
46735 |
123M |
|
46737 |
123M |
|
46739 |
123M |
|
49873 |
409,184M |
|