Query time 0.00045
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "35.41"
},
"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": "3",
"rows_examined_per_scan": 8,
"rows_produced_per_join": 8,
"filtered": "100.00",
"index_condition": "(`cscart`.`gp`.`group_id` in (41,117,116,118,38))",
"cost_info": {
"read_cost": "14.61",
"eval_cost": "1.60",
"prefix_cost": "16.21",
"data_read_per_join": "128"
},
"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": "3",
"ref": [
"cscart.gp.group_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "8.00",
"eval_cost": "1.60",
"prefix_cost": "25.81",
"data_read_per_join": "832"
},
"used_columns": [
"feature_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": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "8.00",
"eval_cost": "1.60",
"prefix_cost": "35.41",
"data_read_per_join": "6K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 549 |
607 |
1223 |
38 |
| 549 |
608 |
1305 |
38 |
| 549 |
623 |
1311 |
41 |
| 549 |
624 |
1226 |
41 |
| 549 |
960 |
1226 |
116 |
| 549 |
961 |
1224 |
116 |
| 549 |
962 |
1226 |
117 |
| 549 |
963 |
1311 |
117 |
| 549 |
964 |
1312 |
117 |
| 549 |
965 |
1226 |
118 |
| 549 |
966 |
1223 |
118 |