Query time 0.00738
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": 41,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (51,48,54,250,69,254,184,133,132,125,120,161,163,164,147,146,145,117,113,148,149,68,6,249,248,140,141,144,143,142,63,66)"
}
},
{
"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": ["cscart.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", "cscart.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 6 |
191M |
|
| 48 |
186M |
|
| 51 |
186M |
|
| 54 |
202M |
|
| 63 |
189M |
|
| 66 |
189M |
|
| 68 |
236M |
|
| 69 |
236M |
|
| 113 |
237M |
|
| 117 |
237M |
|
| 120 |
237M |
|
| 125 |
237M |
|
| 132 |
179,182M |
|
| 133 |
182,179M |
|
| 140 |
180M |
|
| 141 |
180M |
|
| 142 |
180M |
|
| 143 |
180M |
|
| 144 |
180M |
|
| 145 |
179M |
|
| 146 |
179M |
|
| 147 |
179M |
|
| 148 |
179M |
|
| 149 |
179M |
|
| 161 |
199,198M |
|
| 163 |
199,198M |
|
| 164 |
199,198M |
|
| 184 |
200M |
|
| 248 |
255,248M,263M |
|
| 249 |
258,263M |
|
| 250 |
257,263M |
|
| 254 |
260M |
|