Query time 0.12831
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "47.31"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "26.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": 26,
"rows_produced_per_join": 26,
"filtered": "100.00",
"index_condition": "((`cscartdb`.`a`.`option_id` in (893,928)) and (`cscartdb`.`a`.`status` = 'A'))",
"cost_info": {
"read_cost": "9.61",
"eval_cost": "2.60",
"prefix_cost": "12.21",
"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": 26,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.50",
"eval_cost": "2.60",
"prefix_cost": "21.31",
"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 |
17715 |
893 |
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 |
|
Red |
17716 |
893 |
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 |
|
White |
17717 |
893 |
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 |
17718 |
893 |
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 |
|
Purple |
17719 |
893 |
5 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Blue |
17720 |
893 |
6 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Hot pink |
17721 |
893 |
7 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Baby pink |
17722 |
893 |
8 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Brown |
17723 |
893 |
9 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Caramel brown |
17724 |
893 |
10 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Gray |
17725 |
893 |
11 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Green |
17726 |
893 |
12 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Orange |
17727 |
893 |
13 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|