Query time 0.00066
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.122587763,
"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"],
"loops": 1,
"rows": 24,
"cost": 0.04381364,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (413818,442117,433550,450230,439049,414690,448070,414544,431904,404473,422990,448236,413068,425901,407405,406178,437072,430766,447574,460572,460325,406193,451309,446162)",
"using_index": true
}
},
{
"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": ["u985510652_ecartify.cscart_products_categories.category_id"],
"loops": 24,
"rows": 1,
"cost": 0.02228576,
"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",
"u985510652_ecartify.cscart_products_categories.product_id"
],
"loops": 24,
"rows": 1,
"cost": 0.04112736,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 404473 |
305M |
0 |
| 406178 |
305M |
0 |
| 406193 |
305M |
0 |
| 407405 |
305M |
0 |
| 413068 |
305M |
0 |
| 413818 |
305M |
0 |
| 414544 |
305M |
0 |
| 414690 |
305M |
0 |
| 422990 |
305M |
0 |
| 425901 |
305M |
0 |
| 430766 |
305M |
0 |
| 431904 |
305M |
0 |
| 433550 |
305M |
0 |
| 437072 |
305M |
0 |
| 439049 |
305M |
0 |
| 442117 |
305M |
0 |
| 446162 |
305M |
0 |
| 447574 |
305M |
0 |
| 448070 |
305M |
0 |
| 448236 |
305M |
0 |
| 450230 |
305M |
0 |
| 451309 |
305M |
0 |
| 460325 |
305M |
0 |
| 460572 |
305M |
0 |