Query time 0.00093
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.76"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "30.00"
},
"nested_loop": [
{
"table": {
"table_name": "a",
"access_type": "range",
"possible_keys": [
"status",
"option_id",
"option_id_2"
],
"key": "option_id",
"used_key_parts": [
"option_id",
"status"
],
"key_length": "6",
"rows_examined_per_scan": 30,
"rows_produced_per_join": 30,
"filtered": "100.00",
"index_condition": "((`cscartdb`.`a`.`option_id` in (990,1054,895)) and (`cscartdb`.`a`.`status` = 'A'))",
"cost_info": {
"read_cost": "11.26",
"eval_cost": "3.00",
"prefix_cost": "14.26",
"data_read_per_join": "1K"
},
"used_columns": [
"variant_id",
"option_id",
"position",
"modifier",
"modifier_type",
"weight_modifier",
"weight_modifier_type",
"point_modifier",
"point_modifier_type",
"status",
"note_required"
]
}
},
{
"table": {
"table_name": "b",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscartdb.a.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 30,
"filtered": "100.00",
"cost_info": {
"read_cost": "7.50",
"eval_cost": "3.00",
"prefix_cost": "24.76",
"data_read_per_join": "22K"
},
"used_columns": [
"variant_id",
"lang_code",
"variant_name"
]
}
}
]
}
}
}
Result
variant_name |
variant_id |
option_id |
position |
modifier |
modifier_type |
weight_modifier |
weight_modifier_type |
point_modifier |
point_modifier_type |
status |
note_required |
Black |
18167 |
990 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Black |
18788 |
1054 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Only tail without the belt |
18796 |
895 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
White |
18168 |
990 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
White |
18789 |
1054 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Small (28-34 waist) |
18797 |
895 |
2 |
22.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Red |
18169 |
990 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Red |
18790 |
1054 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Medium (32-38 waist) |
18798 |
895 |
3 |
26.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Yellow |
18170 |
990 |
4 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Large (36-42 waist) |
18799 |
895 |
4 |
29.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Violet |
18171 |
990 |
5 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
X-Large (40-46 waist) |
18800 |
895 |
5 |
32.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Baby pink |
18172 |
990 |
6 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Hot pink |
18173 |
990 |
7 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Brown |
18174 |
990 |
8 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Caramel Brown |
18175 |
990 |
9 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Baby Blue |
18176 |
990 |
10 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Lime Green |
18177 |
990 |
11 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Orange |
18178 |
990 |
12 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Gray |
18179 |
990 |
13 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|