Query time 0.00150
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "18.35"
},
"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": 31,
"rows_produced_per_join": 31,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.66",
"eval_cost": "3.10",
"prefix_cost": "6.76",
"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 (56,82,116,117,125,106,39,40,22710,22711,17,57,122,58,5)) 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.75",
"eval_cost": "0.21",
"prefix_cost": "17.61",
"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.53",
"eval_cost": "0.21",
"prefix_cost": "18.35",
"data_read_per_join": "6K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 3 |
5 |
6 |
0 |
OSFA |
| 193 |
5 |
1373 |
0 |
OSFA |
| 3 |
17 |
6 |
0 |
OSFA |
| 193 |
17 |
1373 |
0 |
OSFA |
| 3 |
39 |
26 |
0 |
размер XL |
| 193 |
39 |
1357 |
0 |
S |
| 3 |
40 |
26 |
0 |
размер XL |
| 193 |
40 |
1357 |
0 |
S |
| 3 |
56 |
6 |
0 |
OSFA |
| 193 |
56 |
1373 |
0 |
OSFA |
| 3 |
57 |
6 |
0 |
OSFA |
| 193 |
57 |
1373 |
0 |
OSFA |
| 3 |
58 |
6 |
0 |
OSFA |
| 193 |
58 |
1373 |
0 |
OSFA |
| 3 |
82 |
6 |
0 |
OSFA |
| 3 |
106 |
6 |
0 |
OSFA |
| 193 |
106 |
1373 |
0 |
OSFA |
| 3 |
116 |
39 |
0 |
56-60 |
| 193 |
116 |
1375 |
0 |
56-60 |
| 3 |
117 |
39 |
0 |
56-60 |
| 193 |
117 |
1375 |
0 |
56-60 |
| 3 |
122 |
40 |
0 |
62 |
| 193 |
122 |
1385 |
0 |
60 |
| 3 |
125 |
10 |
0 |
M |
| 193 |
125 |
1357 |
0 |
S |
| 3 |
22710 |
26 |
0 |
размер XL |
| 193 |
22710 |
1358 |
0 |
M |
| 3 |
22711 |
26 |
0 |
размер XL |
| 193 |
22711 |
1359 |
0 |
L |