Query time 0.00714
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": 37,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (4287,41366,35690,42187,794,35475,42170,48851,41381,42182,36522,37292,6481,5599,42185,24715,5592,44940,42168,42186,27078,27076,985,45601,37281,41402,42163,5596,42162,42181,44599,41377)"
}
},
{
"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 |
794 |
143M |
|
985 |
143M |
|
4287 |
143M |
|
5592 |
143M |
|
5596 |
143M |
|
5599 |
143M |
|
6481 |
144M |
|
24715 |
143M |
|
27076 |
151M |
|
27078 |
151M |
|
35475 |
142M |
|
35690 |
143M |
|
36522 |
145,318M |
|
37281 |
145M |
|
37292 |
210,145M |
|
41366 |
210,145M |
|
41377 |
145M |
|
41381 |
143M |
|
41402 |
143M |
|
42162 |
143M |
|
42163 |
143M |
|
42168 |
143M |
|
42170 |
143M |
|
42181 |
143M |
|
42182 |
143M |
|
42185 |
143M |
|
42186 |
143M |
|
42187 |
143M |
|
44599 |
145M |
|
44940 |
141M |
|
45601 |
144M |
|
48851 |
409,209,153M |
|