Query time 0.00097
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 (460402,438135,448865,414574,434263,439645,435106,442622,452529,426624,452048,424261,436348,442119,447602,440833,448732,404249,424146,417229,424226,412627,460205,436067)",
"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 |
| 404249 |
305M |
0 |
| 412627 |
305M |
0 |
| 414574 |
305M |
0 |
| 417229 |
305M |
0 |
| 424146 |
305M |
0 |
| 424226 |
305M |
0 |
| 424261 |
305M |
0 |
| 426624 |
305M |
0 |
| 434263 |
305M |
0 |
| 435106 |
305M |
0 |
| 436067 |
305M |
0 |
| 436348 |
305M |
0 |
| 438135 |
305M |
0 |
| 439645 |
305M |
0 |
| 440833 |
305M |
0 |
| 442119 |
305M |
0 |
| 442622 |
305M |
0 |
| 447602 |
305M |
0 |
| 448732 |
305M |
0 |
| 448865 |
305M |
0 |
| 452048 |
305M |
0 |
| 452529 |
305M |
0 |
| 460205 |
305M |
0 |
| 460402 |
305M |
0 |