Query time 0.00049
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "25.81"
},
"nested_loop": [
{
"table": {
"table_name": "gp",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "4",
"rows_examined_per_scan": 6,
"rows_produced_per_join": 6,
"filtered": "100.00",
"index_condition": "(`portal`.`gp`.`group_id` in (80,78,79))",
"cost_info": {
"read_cost": "10.21",
"eval_cost": "1.20",
"prefix_cost": "11.41",
"data_read_per_join": "96"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "gpf",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "4",
"ref": [
"portal.gp.group_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 6,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "1.20",
"prefix_cost": "18.61",
"data_read_per_join": "672"
},
"used_columns": [
"feature_id",
"group_id"
]
}
},
{
"table": {
"table_name": "pfv",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"fl",
"lang_code",
"product_id",
"fpl"
],
"key": "fpl",
"used_key_parts": [
"feature_id",
"product_id",
"lang_code"
],
"key_length": "12",
"ref": [
"portal.gpf.feature_id",
"portal.gp.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 6,
"filtered": "100.00",
"index_condition": "((`portal`.`gpf`.`feature_id` = `portal`.`pfv`.`feature_id`) and (`portal`.`pfv`.`product_id` = `portal`.`gp`.`product_id`))",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "1.20",
"prefix_cost": "25.81",
"data_read_per_join": "4K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
group_id |
74 |
10043 |
9865 |
78 |
74 |
10067 |
9864 |
78 |
74 |
10046 |
9865 |
79 |
74 |
10069 |
9864 |
79 |
74 |
10041 |
9911 |
80 |
74 |
10083 |
9910 |
80 |
74 |
10085 |
9913 |
80 |