Query time 0.00128
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": "PRIMARY",
"used_key_parts": [
"feature_id",
"product_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 ('29075','29081','29080','29079','29078','29077','29076','29066','29074','29073','29072','29071','29070','29069','29068','29067','29065','26628')))"
}
},
{
"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 |
3973 |
26628 |
Lilac |
4 |
#ffffff |
3983 |
29065 |
Eggplant |
10 |
#ffffff |
3972 |
29066 |
Chartreuse |
16 |
#ffffff |
3985 |
29067 |
Navy |
2 |
#ffffff |
3987 |
29068 |
Coral |
9 |
#ffffff |
3988 |
29069 |
Peachy |
13 |
#ffffff |
3986 |
29070 |
Teal |
1 |
#ffffff |
3989 |
29071 |
Lime |
15 |
#ffffff |
3977 |
29072 |
Blue |
17 |
#ffffff |
3974 |
29073 |
Black |
5 |
#ffffff |
3984 |
29074 |
Rose |
14 |
#ffffff |
3979 |
29075 |
Red |
3 |
#ffffff |
3975 |
29076 |
Snow |
6 |
#ffffff |
3982 |
29077 |
Fuschia |
7 |
#ffffff |
3980 |
29078 |
Mint |
8 |
#ffffff |
3978 |
29079 |
Olive |
0 |
#ffffff |
3981 |
29080 |
Aqua |
12 |
#ffffff |
3976 |
29081 |
Pink |
11 |
#ffffff |