Query time 0.00052
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "23.83"
},
"nested_loop": [
{
"table": {
"table_name": "gpf",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "3",
"rows_examined_per_scan": 5,
"rows_produced_per_join": 5,
"filtered": "100.00",
"index_condition": "(`cscart_db`.`gpf`.`group_id` in (1076,969))",
"cost_info": {
"read_cost": "2.26",
"eval_cost": "0.50",
"prefix_cost": "2.76",
"data_read_per_join": "520"
},
"used_columns": [
"feature_id",
"group_id"
]
}
},
{
"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": [
"cscart_db.gpf.group_id"
],
"rows_examined_per_scan": 4,
"rows_produced_per_join": 20,
"filtered": "100.00",
"cost_info": {
"read_cost": "5.00",
"eval_cost": "2.00",
"prefix_cost": "9.76",
"data_read_per_join": "320"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "pfv",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id",
"fl"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id",
"lang_code"
],
"key_length": "12",
"ref": [
"cscart_db.gp.product_id",
"cscart_db.gpf.feature_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 24,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "11.63",
"eval_cost": "2.44",
"prefix_cost": "23.83",
"data_read_per_join": "977"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 104 |
68888 |
62202 |
969 |
| 104 |
68889 |
62203 |
969 |
| 104 |
68893 |
62207 |
969 |
| 104 |
68890 |
62204 |
969 |
| 104 |
68892 |
62206 |
969 |
| 104 |
68895 |
62209 |
969 |
| 104 |
68891 |
62205 |
969 |
| 104 |
68894 |
62208 |
969 |
| 63 |
68888 |
10351 |
969 |
| 63 |
68889 |
10351 |
969 |
| 63 |
68893 |
10351 |
969 |
| 63 |
68890 |
10351 |
969 |
| 63 |
68892 |
10351 |
969 |
| 63 |
68895 |
10351 |
969 |
| 63 |
68891 |
10351 |
969 |
| 63 |
68894 |
10351 |
969 |
| 63 |
33115 |
10351 |
1076 |
| 63 |
69352 |
10351 |
1076 |
| 67 |
33115 |
12427 |
1076 |
| 67 |
69352 |
32884 |
1076 |
| 162 |
33115 |
62081 |
1076 |
| 162 |
69352 |
62081 |
1076 |