Query time 0.00028
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "4.20"
},
"nested_loop": [
{
"table": {
"table_name": "pvpl",
"access_type": "ref",
"possible_keys": [
"idx_product_id",
"idx_is_discount_stale",
"idx_product_is_discount_stale"
],
"key": "idx_product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.35",
"data_read_per_join": "1K"
},
"used_columns": [
"promo_id",
"product_id",
"discount",
"coupon_code",
"show_best_price_on",
"is_discount_stale",
"promo_to_date"
],
"attached_condition": "(`cscart_db`.`pvpl`.`is_discount_stale` = 'N')"
}
},
{
"table": {
"table_name": "cpd",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"promotion_id"
],
"key_length": "3",
"ref": [
"cscart_db.pvpl.promo_id"
],
"rows_examined_per_scan": 11,
"rows_produced_per_join": 11,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.75",
"eval_cost": "1.10",
"prefix_cost": "4.20",
"data_read_per_join": "26K"
},
"used_columns": [
"promotion_id",
"short_description",
"detailed_description"
]
}
}
]
}
}