Query time 0.00125
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 ('29762','29769','29768','29767','29766','29765','29764','29763','29761','29760','29759','29758','29757','29756','29755','29754','29753','26646')))"
}
},
{
"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 |
3988 |
26646 |
Peachy |
13 |
#ffffff |
3981 |
29753 |
Aqua |
12 |
#ffffff |
3985 |
29754 |
Navy |
2 |
#ffffff |
3976 |
29755 |
Pink |
11 |
#ffffff |
3983 |
29756 |
Eggplant |
10 |
#ffffff |
3989 |
29757 |
Lime |
15 |
#ffffff |
3987 |
29758 |
Coral |
9 |
#ffffff |
3972 |
29759 |
Chartreuse |
16 |
#ffffff |
3977 |
29760 |
Blue |
17 |
#ffffff |
3973 |
29761 |
Lilac |
4 |
#ffffff |
3974 |
29762 |
Black |
5 |
#ffffff |
3984 |
29763 |
Rose |
14 |
#ffffff |
3979 |
29764 |
Red |
3 |
#ffffff |
3975 |
29765 |
Snow |
6 |
#ffffff |
3982 |
29766 |
Fuschia |
7 |
#ffffff |
3980 |
29767 |
Mint |
8 |
#ffffff |
3986 |
29768 |
Teal |
1 |
#ffffff |
3978 |
29769 |
Olive |
0 |
#ffffff |