Query time 0.00063
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "38.21"
},
"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": 9,
"rows_produced_per_join": 9,
"filtered": "100.00",
"index_condition": "(`portal`.`gp`.`group_id` in (80,79,77,51))",
"cost_info": {
"read_cost": "14.81",
"eval_cost": "1.80",
"prefix_cost": "16.61",
"data_read_per_join": "144"
},
"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": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.00",
"eval_cost": "1.80",
"prefix_cost": "27.41",
"data_read_per_join": "1008"
},
"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": 9,
"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": "9.00",
"eval_cost": "1.80",
"prefix_cost": "38.21",
"data_read_per_join": "6K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
group_id |
74 |
4584 |
9865 |
51 |
74 |
5984 |
9903 |
51 |
74 |
10051 |
9865 |
77 |
74 |
10065 |
9864 |
77 |
74 |
10046 |
9865 |
79 |
74 |
10069 |
9864 |
79 |
74 |
10041 |
9911 |
80 |
74 |
10083 |
9910 |
80 |
74 |
10085 |
9913 |
80 |