Query time 0.00953
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": 107,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (27361,1893,47593,49169,38074,6091,6370,49164,49230,48846,47631,42255,40350,2803,47655,5789,33312,5300,5297,1103,65,47024,1102,1104,47020,47023,47022,27353,6369,48558,3862,6368)"
}
},
{
"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 |
65 |
412,119,118M |
|
1102 |
122M |
|
1103 |
122M |
|
1104 |
122M |
|
1893 |
212,315,316,210,409,196M |
|
2803 |
210,173M |
|
3862 |
313,166M |
|
5297 |
122,412 |
|
5300 |
122,412 |
|
5789 |
213,210,119,412,114M |
|
6091 |
315,412,119M |
|
6368 |
174,412M |
|
6369 |
169,412M |
|
6370 |
117,412,119M |
|
27353 |
409,165M |
|
27361 |
409,210,165M |
|
33312 |
119,412 |
|
38074 |
123,209,412,119M |
|
40350 |
409,169M |
|
42255 |
409,169M |
|
47020 |
142M |
|
47022 |
209,210,142M |
|
47023 |
99,142,209,210M |
|
47024 |
142,209,210M |
|
47593 |
210,212,166M |
|
47631 |
210,212,409,166M |
|
47655 |
412,110,315,119,210,209,213M |
|
48558 |
210,144M |
|
48846 |
209,409,153M |
|
49164 |
412,550,110,315,197M |
|
49169 |
409,160M |
|
49230 |
412,166,313M |
|