Query time 0.00322
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": 44,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (6552,6553,1784,31626,83,33720,46749,729,6545,81,18748,2254,35187,227,6097,33697,2258,1532,6100,40760,43797,332,992,1838,1056,5730,141,79,2460,5723,5998,5277)"
}
},
{
"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 |
79 |
122M |
|
81 |
122M |
|
83 |
122M |
|
141 |
124M |
|
227 |
181M |
|
332 |
174M |
|
729 |
156M |
|
992 |
144M |
|
1056 |
210,209,409,160M |
|
1532 |
118M |
|
1784 |
313M |
|
1838 |
317M |
|
2254 |
152M |
|
2258 |
154M |
|
2460 |
169M |
|
5277 |
122M |
|
5723 |
193M |
|
5730 |
158M |
|
5998 |
409,166M |
|
6097 |
121M |
|
6100 |
121M |
|
6545 |
213,412,119M |
|
6552 |
122M |
|
6553 |
122M |
|
18748 |
163M |
|
31626 |
122M |
|
33697 |
145M |
|
33720 |
317M |
|
35187 |
159,156M |
|
40760 |
118M |
|
43797 |
122M |
|
46749 |
154M |
|