Query time 0.00242
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "24.74"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "18.50"
},
"nested_loop": [
{
"table": {
"table_name": "shared_option_variants",
"access_type": "system",
"possible_keys": [
"PRIMARY",
"company_id"
],
"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": "24"
},
"used_columns": [
"variant_id",
"company_id",
"modifier",
"modifier_type"
]
}
},
{
"table": {
"table_name": "a",
"access_type": "ALL",
"possible_keys": [
"status",
"option_id",
"option_id_2"
],
"rows_examined_per_scan": 38,
"rows_produced_per_join": 18,
"filtered": "48.68",
"cost_info": {
"read_cost": "2.54",
"eval_cost": "1.85",
"prefix_cost": "4.39",
"data_read_per_join": "887"
},
"used_columns": [
"variant_id",
"option_id",
"position",
"modifier",
"modifier_type",
"weight_modifier",
"weight_modifier_type",
"status"
],
"attached_condition": "((`maniamall_cscart`.`a`.`option_id` in (36,35,34,33)) and (`maniamall_cscart`.`a`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "b",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"maniamall_cscart.a.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 18,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.85",
"prefix_cost": "6.24",
"data_read_per_join": "14K"
},
"used_columns": [
"variant_id",
"lang_code",
"variant_name"
]
}
}
]
}
}
}
Result
| variant_id |
option_id |
position |
modifier |
modifier_type |
weight_modifier |
weight_modifier_type |
variant_name |
| 208 |
33 |
0 |
0.000 |
A |
0.000 |
A |
Varianta S |
| 209 |
33 |
0 |
100.000 |
A |
0.000 |
A |
Varianta M |
| 210 |
33 |
0 |
150.000 |
A |
0.000 |
A |
Varianta L |
| 211 |
33 |
0 |
200.000 |
A |
0.000 |
A |
Varianta XL |
| 212 |
33 |
0 |
300.000 |
A |
0.000 |
A |
Varianta XXL |
| 213 |
34 |
0 |
0.000 |
A |
0.000 |
A |
Varianta S |
| 214 |
34 |
0 |
100.000 |
A |
0.000 |
A |
Varianta M |
| 215 |
34 |
0 |
150.000 |
A |
0.000 |
A |
Varianta L |
| 216 |
34 |
0 |
200.000 |
A |
0.000 |
A |
Varianta XL |
| 217 |
34 |
0 |
300.000 |
A |
0.000 |
A |
Varianta XXL |
| 218 |
35 |
0 |
0.000 |
A |
0.000 |
A |
Varianta S |
| 219 |
35 |
0 |
100.000 |
A |
0.000 |
A |
Varianta M |
| 220 |
35 |
0 |
150.000 |
A |
0.000 |
A |
Varianta L |
| 221 |
35 |
0 |
200.000 |
A |
0.000 |
A |
Varianta XL |
| 222 |
35 |
0 |
300.000 |
A |
0.000 |
A |
Varianta XXL |
| 223 |
36 |
0 |
0.000 |
A |
0.000 |
A |
Varianta S |
| 224 |
36 |
0 |
50.000 |
A |
0.000 |
A |
Varianta M |
| 225 |
36 |
0 |
80.000 |
A |
0.000 |
A |
Varianta L |
| 226 |
36 |
0 |
120.000 |
A |
0.000 |
A |
Varianta XL |
| 227 |
36 |
0 |
170.000 |
A |
0.000 |
A |
Varianta XXL |