Query time 0.02102
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": 49,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (3519,6198,48069,2669,854,44767,45446,4117,31965,26892,37317,4119,41284,4118,35740,6651,4120,1519,36762,26895,45357,23050,26894,26891,26887,23044,23017,26889,26898,26897,23047,26876)"
}
},
{
"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 |
854 |
168,142,209,210M |
|
1519 |
169M |
|
2669 |
111M |
|
3519 |
340,313M |
|
4117 |
116M |
|
4118 |
111M |
|
4119 |
111M |
|
4120 |
111M |
|
6198 |
340,341,412,210M |
|
6651 |
116M |
|
23017 |
175M |
|
23044 |
210,169M |
|
23047 |
210,212,169M |
|
23050 |
169M |
|
26876 |
169M |
|
26887 |
169M |
|
26889 |
169M |
|
26891 |
169M |
|
26892 |
169M |
|
26894 |
169M |
|
26895 |
169M |
|
26897 |
169M |
|
26898 |
169M |
|
31965 |
210,213,169M |
|
35740 |
169M |
|
36762 |
199,213M |
|
37317 |
111M |
|
41284 |
116,111M |
|
44767 |
169M |
|
45357 |
169M |
|
45446 |
169M |
|
48069 |
210,209,213,114M |
|