Query time 0.00085
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "45.51"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "25.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": 25,
"rows_produced_per_join": 25,
"filtered": "100.00",
"index_condition": "((`cscartdb`.`a`.`option_id` in (990,928)) and (`cscartdb`.`a`.`status` = 'A'))",
"cost_info": {
"read_cost": "9.26",
"eval_cost": "2.50",
"prefix_cost": "11.76",
"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": 25,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.25",
"eval_cost": "2.50",
"prefix_cost": "20.51",
"data_read_per_join": "19K"
},
"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 |
Extra Small |
17591 |
928 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Black |
18167 |
990 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Small |
17592 |
928 |
2 |
5.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
White |
18168 |
990 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Mediume |
17593 |
928 |
3 |
14.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Red |
18169 |
990 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Large |
17594 |
928 |
4 |
24.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Yellow |
18170 |
990 |
4 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Extra Large |
17595 |
928 |
5 |
35.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Violet |
18171 |
990 |
5 |
0.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 |
|