Query time 0.00081
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "38.31"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "21.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": 21,
"rows_produced_per_join": 21,
"filtered": "100.00",
"index_condition": "((`cscartdb`.`a`.`option_id` in (723,747)) and (`cscartdb`.`a`.`status` = 'A'))",
"cost_info": {
"read_cost": "7.86",
"eval_cost": "2.10",
"prefix_cost": "9.96",
"data_read_per_join": "1008"
},
"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": 21,
"filtered": "100.00",
"cost_info": {
"read_cost": "5.25",
"eval_cost": "2.10",
"prefix_cost": "17.31",
"data_read_per_join": "16K"
},
"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 |
Silver |
15346 |
723 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Small - Fuck Me |
16069 |
747 |
1 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Gold |
15347 |
723 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Small - Spank me |
16070 |
747 |
2 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Rose Gold |
15348 |
723 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Small - Breed me |
16071 |
747 |
3 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Rainbow |
15349 |
723 |
4 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Medium - Fuck me |
16072 |
747 |
4 |
5.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Gunmetal |
15350 |
723 |
5 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Medium - Spank me |
16073 |
747 |
5 |
5.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Medium - Breed Me |
16074 |
747 |
6 |
5.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Large - Fuck me |
16075 |
747 |
7 |
10.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Large - Spank me |
16076 |
747 |
8 |
10.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Large - Breed me |
16077 |
747 |
9 |
10.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|
Full Set of 3 |
16078 |
747 |
10 |
73.000 |
A |
0.000 |
A |
0.000 |
A |
A |
|