Query time 0.00034
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "12.60"
},
"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": 3,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.75",
"eval_cost": "0.30",
"prefix_cost": "1.05",
"data_read_per_join": "3K"
},
"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": 33,
"filtered": "100.00",
"cost_info": {
"read_cost": "8.25",
"eval_cost": "3.30",
"prefix_cost": "12.60",
"data_read_per_join": "78K"
},
"used_columns": [
"promotion_id",
"short_description",
"detailed_description"
]
}
}
]
}
}
Result
| promo_id |
discount |
coupon_code |
promo_to_date |
show_best_price_on |
short_description |
detailed_description |
| 2676 |
100.00 |
TESTFREE |
|
B |
<p>Free Samples</p> |
|
| 2497 |
100.00 |
TESTFREE |
|
B |
<p>Extra 25% off on Minimalist and other brands.</p> |
<p>Save extra 25% on orders above 499. Applicable on select brands</p> |
| 2678 |
100.00 |
TESTFREE |
|
B |
<p>Extra 30% off on Birthday</p> |
|