Query time 0.00558
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 (52,47599,41399,4705,1836,45503,4515,47603,31872,23402,5813,23401,1059,4715,22534,4346,1835,5986,34553,48772,19270,2150,1784,4116,41334,6545,3528,1408,29698,31626,1058,19289)"
}
},
{
"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 |
52 |
155M |
|
1058 |
197M |
|
1059 |
166M |
|
1408 |
313M |
|
1784 |
313M |
|
1835 |
160M |
|
1836 |
157M |
|
2150 |
197M |
|
3528 |
340M |
|
4116 |
116M |
|
4346 |
166,165M |
|
4515 |
199M |
|
4705 |
195M |
|
4715 |
195M |
|
5813 |
114M |
|
5986 |
116M |
|
6545 |
213,412,119M |
|
19270 |
340,313M |
|
19289 |
340,313M |
|
22534 |
166M |
|
23401 |
212,157M |
|
23402 |
340M |
|
29698 |
199M |
|
31626 |
122M |
|
31872 |
191M |
|
34553 |
107,201M |
|
41334 |
124M |
|
41399 |
144M |
|
45503 |
192,150M |
|
47599 |
210,212,409,166M |
|
47603 |
210,212,166M |
|
48772 |
149,409,99M |
|