Query time 0.00589
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 (5774,43827,40312,48852,47855,5565,35470,48776,35471,6544,48848,49290,47564,49397,49287,49400,49289,48946,49540,49399,48939,49502,49383,48472,48475,49547,49604,49662,50297,50298,50053,50179)"
}
},
{
"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 |
5565 |
155M |
|
5774 |
184M |
|
6544 |
119,315,412,213M |
|
35470 |
168,142M |
|
35471 |
142M |
|
40312 |
194M |
|
43827 |
123M |
|
47564 |
120M |
|
47855 |
213,110,201M |
|
48472 |
123M |
|
48475 |
123M |
|
48776 |
315,209,123M |
|
48848 |
209,153M |
|
48852 |
209,153M |
|
48939 |
209,110,201,105M |
|
48946 |
412M |
|
49287 |
315,120,96M |
|
49289 |
213,315,120,96M |
|
49290 |
412,315,213,96M |
|
49383 |
409,209,315,153M |
|
49397 |
209,409,153M |
|
49399 |
209,409,153M |
|
49400 |
209,409,153M |
|
49502 |
209,409,153M |
|
49540 |
209,409,153M |
|
49547 |
409,209,153M |
|
49604 |
209,409,153M |
|
49662 |
209,409,153M |
|
50053 |
313M |
|
50179 |
313M |
|
50297 |
169,412M |
|
50298 |
123,412M |
|