Query time 0.00646
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": 89,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (48805,36300,49019,43649,44278,47967,47594,47865,33698,41366,43853,40928,44575,37292,36293,48680,48801,48541,48804,48150,44941,47176,47607,47622,41012,44752,48791,44574,48790,47177,35705,47608)"
}
},
{
"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 |
33698 |
210,145M |
0 |
35705 |
210,144M |
0 |
36293 |
210,160M |
0 |
36300 |
210,160M |
0 |
37292 |
210,145M |
0 |
40928 |
412,213,210,169M |
0 |
41012 |
210,144M |
0 |
41366 |
210,145M |
0 |
43649 |
210,409,154M |
0 |
43853 |
174,412,210M |
0 |
44278 |
210,143M |
0 |
44574 |
210,160M |
0 |
44575 |
210,155M |
0 |
44752 |
210,143M |
0 |
44941 |
210,141M |
0 |
47176 |
210,144M |
0 |
47177 |
210,144M |
0 |
47594 |
210,212,166M |
0 |
47607 |
212,210,166M |
0 |
47608 |
210,212,166M |
0 |
47622 |
210,183,412,213M |
0 |
47865 |
210,110,142M |
0 |
47967 |
110,210,169M |
0 |
48150 |
174,210M |
0 |
48541 |
213,210,169M |
0 |
48680 |
315,210,213,169M |
0 |
48790 |
213,209,210M |
0 |
48791 |
209,213,210M |
0 |
48801 |
210,155M |
0 |
48804 |
210,155M |
0 |
48805 |
210,155M |
0 |
49019 |
209,210,110,213,315,412M |
0 |