Query time 0.00141
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 24,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (1237,271,1009,264,725,250,266,235,873,872,875,874,666,300,669,664,309,287,288,668,667,308,662,663)"
},
"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": ["bacpvdev_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", "bacpvdev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
}
Result
product_id |
category_ids |
position |
235 |
27M |
0 |
250 |
27M |
0 |
264 |
27M |
0 |
266 |
27M |
0 |
271 |
27M |
0 |
287 |
27M |
0 |
288 |
27M |
0 |
300 |
27M |
0 |
308 |
27M |
0 |
309 |
27M |
0 |
662 |
27M |
0 |
663 |
27M |
0 |
664 |
27M |
0 |
666 |
27M |
0 |
667 |
27M |
0 |
668 |
27M |
0 |
669 |
27M |
0 |
725 |
27M |
0 |
872 |
27M |
0 |
873 |
27M |
0 |
874 |
27M |
0 |
875 |
27M |
0 |
1009 |
27M |
0 |
1237 |
27M |
0 |