Query time 0.00060
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.0307483,
"nested_loop": [
{
"table": {
"table_name": "cscart_product_sales",
"access_type": "index",
"possible_keys": ["PRIMARY", "pa"],
"key": "pa",
"key_length": "6",
"used_key_parts": ["product_id", "amount"],
"loops": 1,
"rows": 22,
"cost": 0.00987299,
"filtered": 100,
"attached_condition": "cscart_product_sales.product_id in (13445,13446,13447,13448,15166,15732,18508,13504,13449,14651,14140,13450,13946,13916,13963,13919,13929,13932,13895,14020,14656,14654,14661,13899)",
"using_index": true
}
},
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "link_type", "pt"],
"key": "link_type",
"key_length": "9",
"used_key_parts": ["link_type", "category_id", "product_id"],
"ref": [
"const",
"u508912950_dev_2025.cscart_product_sales.category_id",
"u508912950_dev_2025.cscart_product_sales.product_id"
],
"loops": 22,
"rows": 1,
"cost": 0.02087531,
"filtered": 100,
"attached_condition": "cscart_products_categories.link_type = 'M'",
"using_index": true
}
}
]
}
}
Result
| product_id |
sales_amount |
| 18508 |
5 |