Query time 0.00074
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "19.58"
},
"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": 4,
"rows_produced_per_join": 4,
"filtered": "100.00",
"index_condition": "(`cscart_db`.`gpf`.`group_id` in (965,1056))",
"cost_info": {
"read_cost": "1.91",
"eval_cost": "0.40",
"prefix_cost": "2.31",
"data_read_per_join": "416"
},
"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": 16,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.00",
"eval_cost": "1.60",
"prefix_cost": "7.91",
"data_read_per_join": "256"
},
"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": 19,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.71",
"eval_cost": "1.96",
"prefix_cost": "19.58",
"data_read_per_join": "782"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 104 |
68896 |
62210 |
965 |
| 104 |
68899 |
62213 |
965 |
| 104 |
68897 |
62211 |
965 |
| 104 |
68900 |
62214 |
965 |
| 104 |
68898 |
62212 |
965 |
| 104 |
68901 |
62215 |
965 |
| 63 |
68896 |
10351 |
965 |
| 63 |
68899 |
10351 |
965 |
| 63 |
68897 |
10351 |
965 |
| 63 |
68900 |
10351 |
965 |
| 63 |
68898 |
10351 |
965 |
| 63 |
68901 |
10351 |
965 |
| 63 |
65269 |
10351 |
1056 |
| 63 |
65262 |
10351 |
1056 |
| 68 |
65269 |
33552 |
1056 |
| 68 |
65262 |
12465 |
1056 |
| 162 |
65269 |
62081 |
1056 |
| 162 |
65262 |
62081 |
1056 |