Query time 0.00048
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "48.01"
},
"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`.`gpf`.`group_id` in (127,126,47,125,124))",
"cost_info": {
"read_cost": "11.01",
"eval_cost": "1.00",
"prefix_cost": "12.01",
"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.gpf.group_id"
],
"rows_examined_per_scan": 3,
"rows_produced_per_join": 15,
"filtered": "100.00",
"cost_info": {
"read_cost": "15.00",
"eval_cost": "3.00",
"prefix_cost": "30.01",
"data_read_per_join": "240"
},
"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": "fpl",
"used_key_parts": [
"feature_id",
"product_id",
"lang_code"
],
"key_length": "12",
"ref": [
"cscart.gpf.feature_id",
"cscart.gp.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 15,
"filtered": "100.00",
"cost_info": {
"read_cost": "15.00",
"eval_cost": "3.00",
"prefix_cost": "48.01",
"data_read_per_join": "11K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 549 |
638 |
1226 |
47 |
| 549 |
639 |
1305 |
47 |
| 549 |
992 |
1280 |
124 |
| 549 |
993 |
1302 |
124 |
| 549 |
994 |
1306 |
124 |
| 549 |
995 |
1226 |
124 |
| 549 |
996 |
1224 |
124 |
| 549 |
997 |
1280 |
125 |
| 549 |
998 |
1302 |
125 |
| 549 |
999 |
1201 |
125 |
| 549 |
1000 |
1226 |
125 |
| 549 |
1001 |
1224 |
125 |
| 549 |
1002 |
1280 |
126 |
| 549 |
1003 |
1302 |
126 |
| 549 |
1004 |
1226 |
126 |
| 549 |
1005 |
1224 |
126 |
| 549 |
1006 |
1201 |
126 |
| 549 |
1007 |
1280 |
127 |
| 549 |
1008 |
1302 |
127 |
| 549 |
1009 |
1226 |
127 |
| 549 |
1010 |
1224 |
127 |
| 549 |
1011 |
1201 |
127 |