Query time 0.00409
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": 42,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (26977,6554,15218,41399,25730,47599,2015,2255,6098,48826,40526,6555,25180,286,4071,26854,405,5226,26604,294,33718,2576,26608,26864,2414,21188,2797,2492,26846,2302,6523,38560)"
}
},
{
"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 |
286 |
146M |
|
294 |
149M |
|
405 |
122M |
|
2015 |
176M |
|
2255 |
154M |
|
2302 |
169M |
|
2414 |
121M |
|
2492 |
169M |
|
2576 |
169M |
|
2797 |
173M |
|
4071 |
155M |
|
5226 |
174M |
|
6098 |
121M |
|
6523 |
340,166M |
|
6554 |
183M |
|
6555 |
183M |
|
15218 |
169,412M |
|
21188 |
211M |
|
25180 |
166,212M |
|
25730 |
122M |
|
26604 |
144M |
|
26608 |
144M |
|
26846 |
117M |
|
26854 |
117M |
|
26864 |
117M |
|
26977 |
316,317M |
|
33718 |
193,317M |
|
38560 |
155M |
|
40526 |
159M |
|
41399 |
144M |
|
47599 |
210,212,409,166M |
|
48826 |
210,149M |
|