Query time 0.00068
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1.35"
},
"nested_loop": [
{
"table": {
"table_name": "items",
"access_type": "ref",
"possible_keys": [
"product_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "6.25",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.01",
"prefix_cost": "1.20",
"data_read_per_join": "6"
},
"used_columns": [
"chain_id",
"product_id",
"products",
"modifier",
"modifier_type",
"date_from",
"date_to",
"display_in_promotions",
"status"
],
"attached_condition": "((`webmarco`.`items`.`status` = 'A') and (((`webmarco`.`items`.`date_from` <= 1732143600) and (`webmarco`.`items`.`date_to` >= 1732143600)) or ((`webmarco`.`items`.`date_from` = 0) and (`webmarco`.`items`.`date_to` >= 1732143600)) or ((`webmarco`.`items`.`date_to` = 0) and (`webmarco`.`items`.`date_from` <= 1732143600)) or ((`webmarco`.`items`.`date_to` = 0) and (`webmarco`.`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": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.06",
"eval_cost": "0.01",
"prefix_cost": "1.27",
"data_read_per_join": "500"
},
"used_columns": [
"product_id"
]
}
},
{
"table": {
"table_name": "descr",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"chain_id",
"lang_code"
],
"key_length": "10",
"ref": [
"webmarco.items.chain_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.06",
"eval_cost": "0.01",
"prefix_cost": "1.35",
"data_read_per_join": "11"
},
"used_columns": [
"chain_id",
"name",
"description",
"lang_code"
]
}
}
]
}
}