Query time 0.00376
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": 50,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (5546,48769,31630,37304,5556,16607,6060,2920,38143,4440,5837,27357,38152,35249,27358,2932,18258,46735,14822,18201,40824,2461,41441,31909,5554,31908,2505,4441,6099,5779,34672,33177)"
}
},
{
"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 |
2461 |
169M |
|
2505 |
120M |
|
2920 |
313M |
|
2932 |
157M |
|
4440 |
153,195M |
|
4441 |
153,195M |
|
5546 |
118M |
|
5554 |
123M |
|
5556 |
123M |
|
5779 |
209,210,213,412,114M |
|
5837 |
121M |
|
6060 |
122M |
|
6099 |
121M |
|
14822 |
169M |
|
16607 |
123M |
|
18201 |
122M |
|
18258 |
153,195M |
|
27357 |
213,409,165M |
|
27358 |
210,212,409,165M |
|
31630 |
123M |
|
31908 |
122M |
|
31909 |
122M |
|
33177 |
210,158M |
|
34672 |
122M |
|
35249 |
409,154M |
|
37304 |
145M |
|
38143 |
155M |
|
38152 |
146M |
|
40824 |
409,184M |
|
41441 |
154M |
|
46735 |
123M |
|
48769 |
409,340M |
|