Query time 0.00101
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "2.70"
},
"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": 2,
"rows_produced_per_join": 0,
"filtered": "6.25",
"cost_info": {
"read_cost": "2.00",
"eval_cost": "0.03",
"prefix_cost": "2.40",
"data_read_per_join": "13"
},
"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.12",
"eval_cost": "0.03",
"prefix_cost": "2.55",
"data_read_per_join": "1001"
},
"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.12",
"eval_cost": "0.03",
"prefix_cost": "2.70",
"data_read_per_join": "22"
},
"used_columns": [
"chain_id",
"name",
"description",
"lang_code"
]
}
}
]
}
}
Result
chain_id |
product_id |
products |
modifier |
modifier_type |
date_from |
date_to |
display_in_promotions |
status |
name |
description |
16 |
359747 |
a:1:{i:1819582506;a:4:{s:10:"product_id";s:6:"359744";s:6:"amount";s:1:"1";s:13:"modifier_type";s:8:"by_fixed";s:8:"modifier";d:1.82;}} |
2.180 |
by_fixed |
0 |
0 |
N |
A |
Gonna Similpelle + |
|
17 |
359747 |
a:1:{i:2105884410;a:4:{s:10:"product_id";s:6:"359746";s:6:"amount";s:1:"1";s:13:"modifier_type";s:8:"by_fixed";s:8:"modifier";d:1.82;}} |
2.180 |
by_fixed |
0 |
0 |
N |
A |
Camicia a Quadri + Gonna Similpelle (Taglia M) |
|