Query time 0.00133
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "24.35"
},
"nested_loop": [
{
"table": {
"table_name": "gp",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 8,
"rows_produced_per_join": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.00",
"eval_cost": "0.80",
"prefix_cost": "2.80",
"data_read_per_join": "128"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "pfv",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"fl",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"test2_gaseus.gp.product_id"
],
"rows_examined_per_scan": 7,
"rows_produced_per_join": 30,
"filtered": "54.46",
"using_index": true,
"cost_info": {
"read_cost": "5.28",
"eval_cost": "3.05",
"prefix_cost": "13.68",
"data_read_per_join": "23K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "(`test2_gaseus`.`pfv`.`lang_code` = 'en')"
}
},
{
"table": {
"table_name": "gpf",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"group_id"
],
"key_length": "6",
"ref": [
"test2_gaseus.pfv.feature_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 30,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.63",
"eval_cost": "3.05",
"prefix_cost": "24.35",
"data_read_per_join": "3K"
},
"used_columns": [
"feature_id",
"group_id"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 553 |
13281 |
1912 |
950 |
| 595 |
13281 |
2451 |
950 |
| 622 |
13281 |
2559 |
950 |
| 623 |
13281 |
2524 |
950 |
| 624 |
13281 |
1694 |
950 |
| 625 |
13281 |
2413 |
950 |
| 626 |
13281 |
1926 |
950 |
| 627 |
13281 |
2290 |
950 |
| 628 |
13281 |
1660 |
950 |
| 636 |
13281 |
2344 |
950 |
| 637 |
13281 |
2345 |
950 |
| 553 |
13282 |
1912 |
950 |
| 595 |
13282 |
1787 |
950 |
| 622 |
13282 |
2559 |
950 |
| 623 |
13282 |
2524 |
950 |
| 624 |
13282 |
1694 |
950 |
| 625 |
13282 |
2413 |
950 |
| 626 |
13282 |
1926 |
950 |
| 627 |
13282 |
2290 |
950 |
| 628 |
13282 |
1660 |
950 |
| 636 |
13282 |
2344 |
950 |
| 637 |
13282 |
2345 |
950 |
| 553 |
13283 |
1912 |
950 |
| 595 |
13283 |
1905 |
950 |
| 622 |
13283 |
2559 |
950 |
| 623 |
13283 |
2524 |
950 |
| 624 |
13283 |
1694 |
950 |
| 625 |
13283 |
2413 |
950 |
| 626 |
13283 |
1926 |
950 |
| 627 |
13283 |
2290 |
950 |
| 628 |
13283 |
1660 |
950 |
| 636 |
13283 |
2344 |
950 |
| 637 |
13283 |
2345 |
950 |
| 553 |
13284 |
1912 |
950 |
| 595 |
13284 |
1900 |
950 |
| 622 |
13284 |
2559 |
950 |
| 623 |
13284 |
2524 |
950 |
| 624 |
13284 |
1694 |
950 |
| 625 |
13284 |
2413 |
950 |
| 626 |
13284 |
1926 |
950 |
| 627 |
13284 |
2290 |
950 |
| 628 |
13284 |
1660 |
950 |
| 636 |
13284 |
2344 |
950 |
| 637 |
13284 |
2345 |
950 |
| 553 |
13285 |
1912 |
950 |
| 595 |
13285 |
1462 |
950 |
| 622 |
13285 |
2559 |
950 |
| 623 |
13285 |
2524 |
950 |
| 624 |
13285 |
1694 |
950 |
| 625 |
13285 |
2413 |
950 |
| 626 |
13285 |
1926 |
950 |
| 627 |
13285 |
2290 |
950 |
| 628 |
13285 |
1660 |
950 |
| 636 |
13285 |
2344 |
950 |
| 637 |
13285 |
2345 |
950 |
| 553 |
13280 |
1912 |
950 |
| 595 |
13280 |
1904 |
950 |
| 622 |
13280 |
2559 |
950 |
| 623 |
13280 |
2524 |
950 |
| 624 |
13280 |
1694 |
950 |
| 625 |
13280 |
2413 |
950 |
| 626 |
13280 |
1926 |
950 |
| 627 |
13280 |
2290 |
950 |
| 628 |
13280 |
1660 |
950 |
| 636 |
13280 |
2344 |
950 |
| 637 |
13280 |
2345 |
950 |