Query time 0.00068
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "33.56"
},
"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": 27,
"rows_produced_per_join": 27,
"filtered": "100.00",
"index_condition": "(`test_uchur_k`.`gp`.`group_id` in (253,229,232,231,250,245,251,247,249,246))",
"cost_info": {
"read_cost": "11.96",
"eval_cost": "2.70",
"prefix_cost": "14.66",
"data_read_per_join": "432"
},
"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": [
"test_uchur_k.gp.group_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 27,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.75",
"eval_cost": "2.70",
"prefix_cost": "24.11",
"data_read_per_join": "2K"
},
"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": [
"test_uchur_k.gpf.feature_id",
"test_uchur_k.gp.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 27,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.75",
"eval_cost": "2.70",
"prefix_cost": "33.56",
"data_read_per_join": "20K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
group_id |
| 193 |
51352 |
1392 |
229 |
| 193 |
51351 |
1391 |
229 |
| 193 |
96 |
1390 |
229 |
| 193 |
51354 |
1392 |
231 |
| 193 |
51353 |
1391 |
231 |
| 193 |
43 |
1390 |
231 |
| 193 |
51356 |
1392 |
232 |
| 193 |
51355 |
1391 |
232 |
| 193 |
44 |
1390 |
232 |
| 193 |
50998 |
1390 |
245 |
| 193 |
50999 |
1391 |
246 |
| 193 |
51000 |
1390 |
247 |
| 193 |
51001 |
1390 |
249 |
| 193 |
51002 |
1391 |
250 |
| 193 |
51003 |
1390 |
251 |
| 193 |
80 |
1390 |
253 |
| 193 |
51398 |
1391 |
253 |
| 193 |
51399 |
1392 |
253 |