Query time 0.00234
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.85"
},
"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": 60,
"rows_produced_per_join": 60,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.85",
"eval_cost": "6.00",
"prefix_cost": "12.85",
"data_read_per_join": "46K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1393) and (`cscartdb`.`v`.`product_id` in ('19102','55711','55712','55713','55714','55715','55716','55717','55718','55719','55720','55721','55722','55723','55724','55725','55726','55727','55728','55729','55730','55731','55732','55733','55734','55735','55736','55737','55738','55739','55740','55741','55742','55743','55744','55745','55746','55747','55748','55749','55750','55751','55752','55753','55754','55755','55756','55757','55758','55759','55760','55761','55762','55763','55764','55765','55766','55767','55768','55769')))"
}
},
{
"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": 60,
"filtered": "100.00",
"cost_info": {
"read_cost": "15.00",
"eval_cost": "6.00",
"prefix_cost": "33.85",
"data_read_per_join": "181K"
},
"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": 60,
"filtered": "100.00",
"cost_info": {
"read_cost": "15.00",
"eval_cost": "6.00",
"prefix_cost": "54.85",
"data_read_per_join": "68K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
5584 |
19102 |
Black |
0 |
#000000 |
5585 |
55711 |
Red |
1 |
#000000 |
5586 |
55712 |
Black/Red |
2 |
#000000 |
5587 |
55713 |
White |
3 |
#000000 |
5588 |
55714 |
Black/Silver |
4 |
#000000 |
5589 |
55715 |
Red/Gold |
5 |
#000000 |
5590 |
55716 |
Blue |
6 |
#000000 |
5591 |
55717 |
Purple |
7 |
#000000 |
5592 |
55718 |
White/Yellow |
8 |
#000000 |
5593 |
55719 |
Orange/Yellow |
9 |
#000000 |
5594 |
55720 |
White-Blue Flowers |
10 |
#000000 |
5595 |
55721 |
Flower Sunset |
11 |
#000000 |
5584 |
55722 |
Black |
0 |
#000000 |
5585 |
55723 |
Red |
1 |
#000000 |
5586 |
55724 |
Black/Red |
2 |
#000000 |
5587 |
55725 |
White |
3 |
#000000 |
5588 |
55726 |
Black/Silver |
4 |
#000000 |
5589 |
55727 |
Red/Gold |
5 |
#000000 |
5590 |
55728 |
Blue |
6 |
#000000 |
5591 |
55729 |
Purple |
7 |
#000000 |
5592 |
55730 |
White/Yellow |
8 |
#000000 |
5593 |
55731 |
Orange/Yellow |
9 |
#000000 |
5594 |
55732 |
White-Blue Flowers |
10 |
#000000 |
5595 |
55733 |
Flower Sunset |
11 |
#000000 |
5584 |
55734 |
Black |
0 |
#000000 |
5585 |
55735 |
Red |
1 |
#000000 |
5586 |
55736 |
Black/Red |
2 |
#000000 |
5587 |
55737 |
White |
3 |
#000000 |
5588 |
55738 |
Black/Silver |
4 |
#000000 |
5589 |
55739 |
Red/Gold |
5 |
#000000 |
5590 |
55740 |
Blue |
6 |
#000000 |
5591 |
55741 |
Purple |
7 |
#000000 |
5592 |
55742 |
White/Yellow |
8 |
#000000 |
5593 |
55743 |
Orange/Yellow |
9 |
#000000 |
5594 |
55744 |
White-Blue Flowers |
10 |
#000000 |
5595 |
55745 |
Flower Sunset |
11 |
#000000 |
5584 |
55746 |
Black |
0 |
#000000 |
5585 |
55747 |
Red |
1 |
#000000 |
5586 |
55748 |
Black/Red |
2 |
#000000 |
5587 |
55749 |
White |
3 |
#000000 |
5588 |
55750 |
Black/Silver |
4 |
#000000 |
5589 |
55751 |
Red/Gold |
5 |
#000000 |
5590 |
55752 |
Blue |
6 |
#000000 |
5591 |
55753 |
Purple |
7 |
#000000 |
5592 |
55754 |
White/Yellow |
8 |
#000000 |
5593 |
55755 |
Orange/Yellow |
9 |
#000000 |
5594 |
55756 |
White-Blue Flowers |
10 |
#000000 |
5595 |
55757 |
Flower Sunset |
11 |
#000000 |
5584 |
55758 |
Black |
0 |
#000000 |
5585 |
55759 |
Red |
1 |
#000000 |
5586 |
55760 |
Black/Red |
2 |
#000000 |
5587 |
55761 |
White |
3 |
#000000 |
5588 |
55762 |
Black/Silver |
4 |
#000000 |
5589 |
55763 |
Red/Gold |
5 |
#000000 |
5590 |
55764 |
Blue |
6 |
#000000 |
5591 |
55765 |
Purple |
7 |
#000000 |
5592 |
55766 |
White/Yellow |
8 |
#000000 |
5593 |
55767 |
Orange/Yellow |
9 |
#000000 |
5594 |
55768 |
White-Blue Flowers |
10 |
#000000 |
5595 |
55769 |
Flower Sunset |
11 |
#000000 |