Query time 0.00311
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "9.78"
},
"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": 15,
"rows_produced_per_join": 15,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.34",
"eval_cost": "1.50",
"prefix_cost": "3.84",
"data_read_per_join": "11K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`test2_gaseus`.`pfv`.`feature_id` in (553,625,624,627,628)) and (`test2_gaseus`.`pfv`.`product_id` in (12533,12554,12550)) and (`test2_gaseus`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"test2_gaseus.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "13.16",
"cost_info": {
"read_cost": "3.75",
"eval_cost": "0.20",
"prefix_cost": "9.09",
"data_read_per_join": "2K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`test2_gaseus`.`fv`.`feature_id` = `test2_gaseus`.`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": [
"test2_gaseus.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.49",
"eval_cost": "0.20",
"prefix_cost": "9.78",
"data_read_per_join": "6K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 553 |
12533 |
1935 |
1 |
up to 6.0 (ultrapure gases) |
| 624 |
12533 |
2381 |
0 |
210 |
| 625 |
12533 |
2415 |
0 |
3.5 |
| 627 |
12533 |
1836 |
0 |
Stainless steel |
| 628 |
12533 |
1712 |
0 |
Double stage |
| 553 |
12550 |
1935 |
1 |
up to 6.0 (ultrapure gases) |
| 624 |
12550 |
1803 |
0 |
300 |
| 625 |
12550 |
2423 |
0 |
1.7 |
| 627 |
12550 |
1836 |
0 |
Stainless steel |
| 628 |
12550 |
1712 |
0 |
Double stage |
| 553 |
12554 |
1935 |
1 |
up to 6.0 (ultrapure gases) |
| 624 |
12554 |
1949 |
0 |
70 |
| 625 |
12554 |
2413 |
0 |
1.5 |
| 627 |
12554 |
1836 |
0 |
Stainless steel |
| 628 |
12554 |
1712 |
0 |
Double stage |