Query time 0.00397
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": 54,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (5992,1535,41429,1765,47600,47184,45508,34675,6093,31912,5782,47012,3580,6354,34670,31965,37098,26892,48998,1717,40450,6364,37092,41291,2154,4513,5785,737,6611,26880,35740,41279)"
}
},
{
"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 |
737 |
157M |
|
1535 |
124M |
|
1717 |
340M |
|
1765 |
315,196M |
|
2154 |
160M |
|
3580 |
313,340M |
|
4513 |
199M |
|
5782 |
114M |
|
5785 |
114M |
|
5992 |
121M |
|
6093 |
315,412,118M |
|
6354 |
169,412M |
|
6364 |
412M |
|
6611 |
116M |
|
26880 |
169M |
|
26892 |
169M |
|
31912 |
116M |
|
31965 |
210,213,169M |
|
34670 |
122M |
|
34675 |
122M |
|
35740 |
169M |
|
37092 |
169M |
|
37098 |
213,169M |
|
40450 |
209,409,149M |
|
41279 |
122M |
|
41291 |
209,210,142M |
|
41429 |
213,210,318M |
|
45508 |
197M |
|
47012 |
210,141M |
|
47184 |
210,213M |
|
47600 |
212,210,409,166M |
|
48998 |
409,158M |
|