Query time 0.00151
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.55"
},
"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": 30,
"rows_produced_per_join": 30,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.55",
"eval_cost": "3.00",
"prefix_cost": "6.55",
"data_read_per_join": "23K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1428) and (`cscartdb`.`v`.`product_id` in ('60881','60909','60908','60907','60906','60905','60904','60903','60902','60901','60900','60899','60898','60897','60896','60910','60911','60912','60913','60914','60915','60916','60917','60918','60919','60920','60921','60922','60923','60924')))"
}
},
{
"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": 30,
"filtered": "100.00",
"cost_info": {
"read_cost": "7.50",
"eval_cost": "3.00",
"prefix_cost": "17.05",
"data_read_per_join": "90K"
},
"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": 30,
"filtered": "100.00",
"cost_info": {
"read_cost": "7.50",
"eval_cost": "3.00",
"prefix_cost": "27.55",
"data_read_per_join": "34K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
5743 |
60881 |
1pc - ANY CUSTOM |
0 |
#000000 |
5744 |
60896 |
5pcs (CUSTOM) |
1 |
#000000 |
5745 |
60897 |
10pcs - CUSTOM |
2 |
#000000 |
5746 |
60898 |
15pcs (CUSTOM) |
3 |
#000000 |
5747 |
60899 |
20pcs (CUSTOM) |
4 |
#000000 |
5748 |
60900 |
30pcs (CUSTOM) |
5 |
#000000 |
5749 |
60901 |
40pcs (CUSTOM) |
6 |
#000000 |
5750 |
60902 |
60pcs (CUSTOM) |
7 |
#000000 |
5751 |
60903 |
PACK 1 (20pcs) |
8 |
#000000 |
5752 |
60904 |
PACK 2 (20pcs) |
9 |
#000000 |
5753 |
60905 |
PACK 3 (20pcs) |
10 |
#000000 |
5754 |
60906 |
PACKS 1+2 (40pcs) |
11 |
#000000 |
5755 |
60907 |
PACKS 1+3 (40pcs) |
12 |
#000000 |
5756 |
60908 |
PACKS 2+3 (40pcs) |
13 |
#000000 |
5757 |
60909 |
PACKS 1+2+3 (60pcs) |
14 |
#000000 |
5743 |
60910 |
1pc - ANY CUSTOM |
0 |
#000000 |
5744 |
60911 |
5pcs (CUSTOM) |
1 |
#000000 |
5745 |
60912 |
10pcs - CUSTOM |
2 |
#000000 |
5746 |
60913 |
15pcs (CUSTOM) |
3 |
#000000 |
5747 |
60914 |
20pcs (CUSTOM) |
4 |
#000000 |
5748 |
60915 |
30pcs (CUSTOM) |
5 |
#000000 |
5749 |
60916 |
40pcs (CUSTOM) |
6 |
#000000 |
5750 |
60917 |
60pcs (CUSTOM) |
7 |
#000000 |
5751 |
60918 |
PACK 1 (20pcs) |
8 |
#000000 |
5752 |
60919 |
PACK 2 (20pcs) |
9 |
#000000 |
5753 |
60920 |
PACK 3 (20pcs) |
10 |
#000000 |
5754 |
60921 |
PACKS 1+2 (40pcs) |
11 |
#000000 |
5755 |
60922 |
PACKS 1+3 (40pcs) |
12 |
#000000 |
5756 |
60923 |
PACKS 2+3 (40pcs) |
13 |
#000000 |
5757 |
60924 |
PACKS 1+2+3 (60pcs) |
14 |
#000000 |