Query time 0.00460
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": 75,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (2006,1998,45571,36765,47967,2010,45569,48680,2011,44948,36764,35487,36498,45570,45575,48043,48817,48814,47973,48813,48815,48038,48041,48040,48045,48039,48654,48044,48042,48948,49320,48656)"
}
},
{
"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 |
1998 |
176M |
|
2006 |
176M |
|
2010 |
176M |
|
2011 |
176M |
|
35487 |
169M |
|
36498 |
199M |
|
36764 |
169M |
|
36765 |
169M |
|
44948 |
199M |
|
45569 |
169M |
|
45570 |
169M |
|
45571 |
166,169M |
|
45575 |
169M |
|
47967 |
110,210,169M |
|
47973 |
210,110,169M |
|
48038 |
210,213,169M |
|
48039 |
213,169,210M |
|
48040 |
213,169,210M |
|
48041 |
210,213,412,169M |
|
48042 |
213,210,412,169M |
|
48043 |
213,210,412,169M |
|
48044 |
213,210,412,169M |
|
48045 |
213,210,412,169M |
|
48654 |
212,213,199M |
|
48656 |
212,213,199M |
|
48680 |
315,210,213,169M |
|
48813 |
166,212,195M |
|
48814 |
166,195M |
|
48815 |
166,195M |
|
48817 |
166,212,195M |
|
48948 |
110,213,199M |
|
49320 |
169,412M |
|