Query time 0.00098
JSON explain
{
"query_block": {
"select_id": 1,
"const_condition": "1",
"nested_loop": [
{
"table": {
"table_name": "cscart_products",
"access_type": "const",
"possible_keys": ["PRIMARY", "status"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "cscart_companies",
"access_type": "const",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "ref",
"possible_keys": ["pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["const"],
"rows": 2,
"filtered": 100,
"using_index": true
}
},
{
"table": {
"table_name": "CT",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "22",
"used_key_parts": ["city_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(CT.city_id = <cache>(convert('01' using utf8mb4)))"
}
}
]
}
}
Result
location |
Thành phố Hà Nội |
Thành phố Hà Nội |