Query time 0.00110
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "31.11"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "17.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": 17,
"rows_produced_per_join": 17,
"filtered": "100.00",
"index_condition": "((`cscartdb`.`a`.`option_id` in (451,452)) and (`cscartdb`.`a`.`status` = 'A'))",
"cost_info": {
"read_cost": "6.46",
"eval_cost": "1.70",
"prefix_cost": "8.16",
"data_read_per_join": "816"
},
"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": 17,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.25",
"eval_cost": "1.70",
"prefix_cost": "14.11",
"data_read_per_join": "13K"
},
"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 |
32A |
12548 |
451 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
XS |
12563 |
452 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
32B |
12549 |
451 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
S |
12564 |
452 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
32C |
12550 |
451 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
M |
12565 |
452 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
32D |
12551 |
451 |
4 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
L |
12566 |
452 |
4 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
34A |
12552 |
451 |
5 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
XL |
12567 |
452 |
5 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
34B |
12553 |
451 |
6 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
2XL |
12568 |
452 |
6 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
34C |
12554 |
451 |
7 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
3XL |
12569 |
452 |
7 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
34D |
12555 |
451 |
8 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
36A |
12556 |
451 |
9 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
36B |
12557 |
451 |
10 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
36C |
12558 |
451 |
11 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
36D |
12559 |
451 |
12 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
38A |
12560 |
451 |
13 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
38B |
12561 |
451 |
14 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
38C |
12562 |
451 |
15 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|