Query time 0.00096
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.09"
},
"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": 2,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.50",
"eval_cost": "0.20",
"prefix_cost": "0.70",
"data_read_per_join": "32"
},
"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": 7,
"filtered": "54.46",
"using_index": true,
"cost_info": {
"read_cost": "1.32",
"eval_cost": "0.76",
"prefix_cost": "3.42",
"data_read_per_join": "5K"
},
"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": 7,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.91",
"eval_cost": "0.76",
"prefix_cost": "6.09",
"data_read_per_join": "793"
},
"used_columns": [
"feature_id",
"group_id"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 553 |
12958 |
1973 |
892 |
| 595 |
12958 |
2000 |
892 |
| 622 |
12958 |
2504 |
892 |
| 623 |
12958 |
2501 |
892 |
| 624 |
12958 |
2503 |
892 |
| 625 |
12958 |
2413 |
892 |
| 626 |
12958 |
1680 |
892 |
| 627 |
12958 |
1659 |
892 |
| 628 |
12958 |
1660 |
892 |
| 636 |
12958 |
2348 |
892 |
| 637 |
12958 |
2345 |
892 |
| 646 |
12958 |
2369 |
892 |
| 647 |
12958 |
2373 |
892 |
| 553 |
12959 |
1973 |
892 |
| 595 |
12959 |
2000 |
892 |
| 622 |
12959 |
2504 |
892 |
| 623 |
12959 |
2501 |
892 |
| 624 |
12959 |
2503 |
892 |
| 625 |
12959 |
2413 |
892 |
| 626 |
12959 |
1680 |
892 |
| 627 |
12959 |
1659 |
892 |
| 628 |
12959 |
1660 |
892 |
| 636 |
12959 |
2348 |
892 |
| 637 |
12959 |
2345 |
892 |
| 646 |
12959 |
2370 |
892 |
| 647 |
12959 |
2374 |
892 |