Query time 0.00452
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": 51,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (5549,40434,4122,37318,46737,34671,2922,4121,47658,47010,38135,41397,2964,31640,3180,40440,5506,34053,3586,45507,27354,389,803,5445,1713,19348,3388,44422,47984,2278,3874,38134)"
}
},
{
"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 |
389 |
197M |
|
803 |
210,143M |
|
1713 |
123,340M |
|
2278 |
116M |
|
2922 |
313M |
|
2964 |
120M |
|
3180 |
340M |
|
3388 |
124M |
|
3586 |
340M |
|
3874 |
313,166M |
|
4121 |
116M |
|
4122 |
116M |
|
5445 |
340,171M |
|
5506 |
202M |
|
5549 |
123M |
|
19348 |
126M |
|
27354 |
409,165M |
|
31640 |
117M |
|
34053 |
409,160M |
|
34671 |
122M |
|
37318 |
193,166M |
|
38134 |
160M |
|
38135 |
160M |
|
40434 |
210,209,409,149M |
|
40440 |
409,149M |
|
41397 |
144M |
|
44422 |
122M |
|
45507 |
197M |
|
46737 |
123M |
|
47010 |
210,141M |
|
47658 |
412,119M |
|
47984 |
212,110,213,315,313M |
|