Query time 0.00243
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": 39,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (2133,2508,18260,33747,2966,263,31628,3877,6615,5894,2135,6056,2507,2591,2501,1710,2284,19285,5568,3879,4305,2652,23419,3749,31641,2510,2237,1881,400,2963,6533,46734)"
}
},
{
"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 |
263 |
116M |
|
400 |
122M |
|
1710 |
123M |
|
1881 |
109M |
|
2133 |
120M |
|
2135 |
120M |
|
2237 |
123M |
|
2284 |
116M |
|
2501 |
121M |
|
2507 |
120M |
|
2508 |
120M |
|
2510 |
120M |
|
2591 |
116M |
|
2652 |
178M |
|
2963 |
120M |
|
2966 |
120M |
|
3749 |
211,215M |
|
3877 |
313,166M |
|
3879 |
313,166M |
|
4305 |
316,317M |
|
5568 |
123M |
|
5894 |
114M |
|
6056 |
122M |
|
6533 |
118M |
|
6615 |
116M |
|
18260 |
153,195M |
|
19285 |
340,313M |
|
23419 |
212,197M |
|
31628 |
122M |
|
31641 |
117M |
|
33747 |
174M |
|
46734 |
123M |
|