Query time 0.00143
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "16.63"
},
"nested_loop": [
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id"
],
"key_length": "6",
"rows_examined_per_scan": 18,
"rows_produced_per_join": 18,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.23",
"eval_cost": "1.80",
"prefix_cost": "4.03",
"data_read_per_join": "13K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1071) and (`cscartdb`.`v`.`product_id` in ('26682','26684','26683','26673','26681','26680','26679','26678','26677','26676','26675','26674','26672','26671','26670','26669','26668','26620')))"
}
},
{
"table": {
"table_name": "vd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscartdb.v.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 18,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.50",
"eval_cost": "1.80",
"prefix_cost": "10.33",
"data_read_per_join": "54K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "vf",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"cscartdb.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 18,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.50",
"eval_cost": "1.80",
"prefix_cost": "16.63",
"data_read_per_join": "20K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
3972 |
26620 |
Chartreuse |
16 |
#ffffff |
3973 |
26668 |
Lilac |
4 |
#ffffff |
3974 |
26669 |
Black |
5 |
#ffffff |
3975 |
26670 |
Snow |
6 |
#ffffff |
3976 |
26671 |
Pink |
11 |
#ffffff |
3977 |
26672 |
Blue |
17 |
#ffffff |
3978 |
26673 |
Olive |
0 |
#ffffff |
3979 |
26674 |
Red |
3 |
#ffffff |
3980 |
26675 |
Mint |
8 |
#ffffff |
3981 |
26676 |
Aqua |
12 |
#ffffff |
3982 |
26677 |
Fuschia |
7 |
#ffffff |
3983 |
26678 |
Eggplant |
10 |
#ffffff |
3984 |
26679 |
Rose |
14 |
#ffffff |
3985 |
26680 |
Navy |
2 |
#ffffff |
3986 |
26681 |
Teal |
1 |
#ffffff |
3987 |
26682 |
Coral |
9 |
#ffffff |
3988 |
26683 |
Peachy |
13 |
#ffffff |
3989 |
26684 |
Lime |
15 |
#ffffff |