Query time 0.00164
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "176.81"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "53.00"
},
"nested_loop": [
{
"table": {
"table_name": "shared_option_variants",
"access_type": "system",
"possible_keys": [
"PRIMARY",
"company_id"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "24"
},
"used_columns": [
"variant_id",
"company_id",
"modifier",
"modifier_type"
]
}
},
{
"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": 53,
"rows_produced_per_join": 53,
"filtered": "100.00",
"index_condition": "((`eshopuga_upgr_4122`.`a`.`option_id` in (1961,1983,2005,2544,2599,2654,2570,2625,2680,1970,1992,2014,1969,1991,2013,2579,2634,2689,330,248,334,335,2558,2613,2668,1966,1988,2010,209,345,403,461,208,344,402,460,2577,2632,2687)) and (`eshopuga_upgr_4122`.`a`.`status` = 'A'))",
"cost_info": {
"read_cost": "102.61",
"eval_cost": "10.60",
"prefix_cost": "113.21",
"data_read_per_join": "2K"
},
"used_columns": [
"variant_id",
"option_id",
"position",
"modifier",
"modifier_type",
"weight_modifier",
"weight_modifier_type",
"point_modifier",
"point_modifier_type",
"status"
]
}
},
{
"table": {
"table_name": "b",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"eshopuga_upgr_4122.a.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 53,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "10.60",
"prefix_cost": "123.81",
"data_read_per_join": "40K"
},
"used_columns": [
"variant_id",
"lang_code",
"variant_name"
]
}
}
]
}
}
}
Result
variant_id |
option_id |
position |
modifier |
modifier_type |
weight_modifier |
weight_modifier_type |
point_modifier |
point_modifier_type |
variant_name |
744 |
330 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
750 |
334 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
766 |
344 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
768 |
345 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
882 |
402 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
884 |
403 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
1930 |
1983 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
1940 |
1988 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
1946 |
1991 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
1948 |
1992 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
2336 |
2599 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
2364 |
2613 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
2388 |
2625 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
2402 |
2632 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
2406 |
2634 |
0 |
0.000 |
A |
0.000 |
A |
0.000 |
A |
|
743 |
330 |
1 |
9.000 |
A |
0.000 |
A |
0.000 |
A |
|
749 |
334 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
765 |
344 |
1 |
9.000 |
A |
0.000 |
A |
0.000 |
A |
|
767 |
345 |
1 |
9.000 |
A |
0.000 |
A |
0.000 |
A |
|
881 |
402 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
883 |
403 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
1929 |
1983 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
1939 |
1988 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
1945 |
1991 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
1947 |
1992 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
2335 |
2599 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
2363 |
2613 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
2387 |
2625 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
2401 |
2632 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|
2405 |
2634 |
1 |
2.000 |
A |
0.000 |
A |
0.000 |
A |
|