Query time 0.02202
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": 121,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (36499,2295,47279,36497,47652,37097,34548,41428,37091,42372,46696,36758,1973,41427,48692,27015,5768,36500,27854,31962,48683,48677,48684,31961,48070,49019,40928,48680,48541,48032,47855,47853)"
}
},
{
"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 |
1973 |
210,213,169M |
0 |
2295 |
210,213,412,169M |
0 |
5768 |
315,213,210,184M |
0 |
27015 |
315,210,213,169M |
0 |
27854 |
412,210,213,169M |
0 |
31961 |
213,169M |
0 |
31962 |
213,169M |
0 |
34548 |
119,412,213M |
0 |
36497 |
213,199M |
0 |
36499 |
213,199M |
0 |
36500 |
212,213,199M |
0 |
36758 |
412,210,213M |
0 |
37091 |
213,199M |
0 |
37097 |
213,210,166,169M |
0 |
40928 |
412,213,210,169M |
0 |
41427 |
210,213,318M |
0 |
41428 |
213,210,318M |
0 |
42372 |
181,412,213M |
0 |
46696 |
210,213,409,166M |
0 |
47279 |
213,166M |
0 |
47652 |
315,110,119,412,213M |
0 |
47853 |
110,111,315,412,213M |
0 |
47855 |
213,110,201M |
0 |
48032 |
191,213,110,211M |
0 |
48070 |
210,209,213,114M |
0 |
48541 |
213,210,169M |
0 |
48677 |
409,315,213,210,169M |
0 |
48680 |
315,210,213,169M |
0 |
48683 |
210,213,409,315,169M |
0 |
48684 |
210,213,315,169M |
0 |
48692 |
210,315,213,169M |
0 |
49019 |
209,210,110,213,315,412M |
0 |