Query time 0.00771
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": 56,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1781,3620,35254,20932,47598,6558,6559,6554,6555,6367,3975,1784,18748,35187,40760,992,5998,2805,5765,1517,18749,18747,2163,41017,6543,38129,5759,40309,47652,5770,41418,5635)"
}
},
{
"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 |
992 |
144M |
|
1517 |
173M |
|
1781 |
313M |
|
1784 |
313M |
|
2163 |
146,318M |
|
2805 |
210,173M |
|
3620 |
142M |
|
3975 |
160M |
|
5635 |
209,154M |
|
5759 |
184M |
|
5765 |
183,315M |
|
5770 |
184M |
|
5998 |
409,166M |
|
6367 |
119,412M |
|
6543 |
211,212,412,119M |
|
6554 |
183M |
|
6555 |
183M |
|
6558 |
183M |
|
6559 |
183M |
|
18747 |
163M |
|
18748 |
163M |
|
18749 |
163M |
|
20932 |
121M |
|
35187 |
159,156M |
|
35254 |
409,154M |
|
38129 |
155M |
|
40309 |
124M |
|
40760 |
118M |
|
41017 |
210,143M |
|
41418 |
141M |
|
47598 |
210,212,409,166M |
|
47652 |
315,110,119,412,213M |
|