Query time 0.00474
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": 39,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (534,6559,41229,5500,6554,46716,2458,6555,2255,26854,286,6098,25180,5226,405,2414,26864,2797,26846,36834,6367,4460,933,1059,6557,1041,2567,25850,6106,3975,1835,2257)"
}
},
{
"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 |
|
405 |
122M |
|
534 |
166,212M |
|
933 |
173M |
|
1041 |
156,159M |
|
1059 |
166M |
|
1835 |
160M |
|
2255 |
154M |
|
2257 |
154M |
|
2414 |
121M |
|
2458 |
169M |
|
2567 |
121M |
|
2797 |
173M |
|
3975 |
160M |
|
4460 |
122M |
|
5226 |
174M |
|
5500 |
121M |
|
6098 |
121M |
|
6106 |
121M |
|
6367 |
119,412M |
|
6554 |
183M |
|
6555 |
183M |
|
6557 |
183M |
|
6559 |
183M |
|
25180 |
166,212M |
|
25850 |
160M |
|
26846 |
117M |
|
26854 |
117M |
|
26864 |
117M |
|
36834 |
163,318M |
|
41229 |
214M |
|
46716 |
99,151,193M |
|