{
"query_block": {
"select_id": 1,
"cost": 0.110742806,
"filesort": {
"sort_key": "pc.category_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "products",
"access_type": "range",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"loops": 1,
"rows": 5,
"cost": 0.003922077,
"filtered": 100,
"attached_condition": "products.product_id in (228,229,205,206,207)",
"using_index": true
}
},
{
"table": {
"table_name": "pc",
"access_type": "ref",
"possible_keys": ["pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["tmall.products.product_id"],
"loops": 5,
"rows": 11,
"cost": 0.071212957,
"filtered": 100
}
}
]
}
}
}
}
| category_id | total_products |
|---|---|
| 170 | 2 |
| 171 | 3 |