Query time 0.00950
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "314.60"
},
"nested_loop": [
{
"table": {
"table_name": "descr",
"access_type": "system",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "176"
},
"used_columns": [
"chain_id",
"name",
"description",
"lang_code"
]
}
},
{
"table": {
"table_name": "items",
"access_type": "ALL",
"rows_examined_per_scan": 3016,
"rows_produced_per_join": 5,
"filtered": "0.18",
"cost_info": {
"read_cost": "313.53",
"eval_cost": "0.54",
"prefix_cost": "314.06",
"data_read_per_join": "557"
},
"used_columns": [
"chain_id",
"product_id",
"products",
"modifier",
"modifier_type",
"date_from",
"date_to",
"display_in_promotions",
"status"
],
"attached_condition": "((`maniamall_cscart`.`items`.`product_id` = 1444124) and (`maniamall_cscart`.`items`.`status` = 'A') and (((`maniamall_cscart`.`items`.`date_from` <= 1776805200) and (`maniamall_cscart`.`items`.`date_to` >= 1776805200)) or ((`maniamall_cscart`.`items`.`date_from` = 0) and (`maniamall_cscart`.`items`.`date_to` >= 1776805200)) or ((`maniamall_cscart`.`items`.`date_to` = 0) and (`maniamall_cscart`.`items`.`date_from` <= 1776805200)) or ((`maniamall_cscart`.`items`.`date_to` = 0) and (`maniamall_cscart`.`items`.`date_from` = 0))))"
}
},
{
"table": {
"table_name": "p",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.54",
"prefix_cost": "314.60",
"data_read_per_join": "23K"
},
"used_columns": [
"product_id",
"company_id"
]
}
}
]
}
}
Result
| chain_id |
product_id |
products |
modifier |
modifier_type |
date_from |
date_to |
display_in_promotions |
status |
name |
description |
company_id |
| 2516 |
1444124 |
[{"product_id": 241391,"amount": 1}] |
10.000 |
P |
0 |
0 |
Y |
A |
|
|
1 |