Query time 0.00243
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": 46,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (41363,41388,47610,4857,41138,4868,2640,41359,33704,41014,4817,37293,43460,2639,3193,37285,5757,41362,49256,38149,4821,4864,20838,1518,31943,41136,41371,47605,2623,33699,726,4810)"
}
},
{
"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 |
726 |
156M |
|
1518 |
173M |
|
2623 |
146,318M |
|
2639 |
144M |
|
2640 |
144M |
|
3193 |
169M |
|
4810 |
317M |
|
4817 |
317M |
|
4821 |
317M |
|
4857 |
175M |
|
4864 |
181M |
|
4868 |
175M |
|
5757 |
184M |
|
20838 |
146,318M |
|
31943 |
117M |
|
33699 |
145M |
|
33704 |
210,145M |
|
37285 |
145M |
|
37293 |
145M |
|
38149 |
146M |
|
41014 |
144M |
|
41136 |
318M |
|
41138 |
318M |
|
41359 |
145M |
|
41362 |
145M |
|
41363 |
145M |
|
41371 |
145M |
|
41388 |
145M |
|
43460 |
182M |
|
47605 |
212,210,166M |
|
47610 |
210,212,409,166M |
|
49256 |
409,210,160M |
|