Query time 0.00061
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.02870612,
"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": 20,
"cost": 0.00957962,
"filtered": 100,
"attached_condition": "cscart_product_sales.product_id in (14005,15746,16337,16336,15745,14662,13464,13998,13933,14148,14678,14131,13465,18481,19930,19598,19599,19602,14142,14138,14133,14137,13497,15734)",
"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": 20,
"rows": 1,
"cost": 0.0191265,
"filtered": 100,
"attached_condition": "cscart_products_categories.link_type = 'M'",
"using_index": true
}
}
]
}
}
Result
| product_id |
sales_amount |
| 19598 |
6 |
| 19599 |
8 |
| 19602 |
3 |