Query time 0.01072
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 55,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (280,689,281,283,286,287,501,289,288,291,483,293,294,295,296,641,298,299,300,577,301,302,646,498,304,306,307,514)"
},
"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": ["markins_test.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", "markins_test.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
}
Result
product_id |
category_ids |
position |
280 |
263M |
10 |
281 |
263M |
30 |
283 |
263M |
40 |
286 |
257,263M |
50 |
287 |
257,263M |
60 |
288 |
257,263M |
100 |
289 |
257,263M |
70 |
291 |
257,263M |
120 |
293 |
257,263M |
150 |
294 |
257,263M |
160 |
295 |
263,257M |
170 |
296 |
257,263M |
180 |
298 |
257,263M |
200 |
299 |
257,263M |
210 |
300 |
257,263M |
220 |
301 |
257,263M |
240 |
302 |
263,257M |
250 |
304 |
257,263M |
270 |
306 |
257,263M |
280 |
307 |
263,257M |
290 |
483 |
257,263M |
135 |
498 |
257,263M |
265 |
501 |
257,263M |
65 |
514 |
257,263M |
301 |
577 |
257,263M |
230 |
641 |
281,263M |
190 |
646 |
257,263M |
255 |
689 |
263M |
10 |