Query time 0.00172
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "17.76"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 30,
"rows_produced_per_join": 30,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.55",
"eval_cost": "3.00",
"prefix_cost": "6.55",
"data_read_per_join": "23K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`test_uchur_k`.`pfv`.`feature_id` in (193,3)) and (`test_uchur_k`.`pfv`.`product_id` in (50,53,91,105,48,30,82,40,17,57,54,35,16,19,43)) and (`test_uchur_k`.`pfv`.`lang_code` = 'ru'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"test_uchur_k.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "6.81",
"cost_info": {
"read_cost": "7.50",
"eval_cost": "0.20",
"prefix_cost": "17.05",
"data_read_per_join": "3K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`test_uchur_k`.`fv`.`feature_id` = `test_uchur_k`.`pfv`.`feature_id`)"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"test_uchur_k.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.51",
"eval_cost": "0.20",
"prefix_cost": "17.77",
"data_read_per_join": "6K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 3 |
16 |
6 |
0 |
OSFA |
| 193 |
16 |
1373 |
0 |
OSFA |
| 3 |
17 |
6 |
0 |
OSFA |
| 193 |
17 |
1373 |
0 |
OSFA |
| 3 |
19 |
15 |
0 |
34x30 |
| 193 |
19 |
1371 |
0 |
30x30 |
| 3 |
30 |
25 |
0 |
размер L |
| 193 |
30 |
1357 |
0 |
S |
| 3 |
35 |
11 |
0 |
L |
| 193 |
35 |
1357 |
0 |
S |
| 3 |
40 |
26 |
0 |
размер XL |
| 193 |
40 |
1357 |
0 |
S |
| 3 |
43 |
30 |
0 |
р.41 |
| 193 |
43 |
1390 |
0 |
41 |
| 3 |
48 |
8 |
0 |
S |
| 193 |
48 |
1357 |
0 |
S |
| 3 |
50 |
26 |
0 |
размер XL |
| 193 |
50 |
1357 |
0 |
S |
| 3 |
53 |
8 |
0 |
S |
| 193 |
53 |
1357 |
0 |
S |
| 3 |
54 |
9 |
0 |
2XL |
| 193 |
54 |
1357 |
0 |
S |
| 3 |
57 |
6 |
0 |
OSFA |
| 193 |
57 |
1373 |
0 |
OSFA |
| 3 |
82 |
6 |
0 |
OSFA |
| 3 |
91 |
18 |
0 |
36x30 |
| 193 |
91 |
1365 |
0 |
32x30 |
| 3 |
105 |
6 |
0 |
OSFA |
| 193 |
105 |
1373 |
0 |
OSFA |