Query time 0.00162
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": 30,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (692,1189,845,765,598,1024,1416,1432,1410,558,557,556,1421,1406,1422,1413,753,566,1021,536,686,519,764,1226,1419,1447,613,545,685,1012)"
},
"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", "bacpvdev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
},
"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": ["bacpvdev_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')"
}
}
}
Result
product_id |
category_ids |
position |
519 |
39M |
0 |
536 |
39M |
0 |
545 |
39M |
0 |
556 |
39M |
0 |
557 |
39M |
0 |
558 |
39M |
0 |
566 |
39M |
0 |
598 |
39M |
0 |
613 |
39M |
0 |
685 |
39M |
0 |
686 |
39M |
0 |
692 |
39M |
0 |
753 |
39M |
0 |
764 |
39M |
0 |
765 |
39M |
0 |
845 |
39M |
0 |
1012 |
39M |
0 |
1021 |
39M |
0 |
1024 |
39M |
0 |
1189 |
39M |
0 |
1226 |
39M |
0 |
1406 |
39M |
0 |
1410 |
39M |
0 |
1413 |
39M |
0 |
1416 |
39M |
0 |
1419 |
39M |
0 |
1421 |
39M |
0 |
1422 |
39M |
0 |
1432 |
39M |
0 |
1447 |
39M |
0 |