diff --git a/pkg/sql/plan/utils.go b/pkg/sql/plan/utils.go index 2c11b9b2964b4..0e502c8973a46 100644 --- a/pkg/sql/plan/utils.go +++ b/pkg/sql/plan/utils.go @@ -1097,6 +1097,14 @@ func ExprIsZonemappable(ctx context.Context, expr *plan.Expr) bool { } return true + + case *plan.Expr_Col: + // Array types don't support zonemapping + if expr.Typ.Id == int32(types.T_array_float32) || expr.Typ.Id == int32(types.T_array_float64) { + return false + } + return true + default: return true } diff --git a/test/distributed/cases/vector/vector_ivf_async.result b/test/distributed/cases/vector/vector_ivf_async.result index efdbc7b019f17..c7a516a470195 100644 --- a/test/distributed/cases/vector/vector_ivf_async.result +++ b/test/distributed/cases/vector/vector_ivf_async.result @@ -12,9 +12,9 @@ Table Create Table ivf1_async CREATE TABLE `ivf1_async` (\n `a` int NOT NULL,\n `b` vecf32(128) DEFAULT NULL,\n `c` int DEFAULT NULL,\n PRIMARY KEY (`a`),\n KEY `c_k` (`c`),\n KEY `idx01` USING ivfflat (`b`) lists = 5 op_type 'vector_l2_ops' async \n) desc ivf1_async; Field Type Null Key Default Extra Comment -a INT(32) NO PRI null -b VECF32(128) YES MUL null -c INT(32) YES MUL null +a INT(32) NO PRI null +b VECF32(128) YES MUL null +c INT(32) YES MUL null insert into ivf1_async values(9779, " [10, 15, 0, 0, 5, 46, 5, 5, 4, 0, 0, 0, 28, 118, 12, 5, 75, 44, 5, 0, 6, 32, 6, 49, 41, 74, 9, 1, 0, 0, 0, 9, 1, 9, 16, 41, 71, 80, 3, 0, 0, 4, 3, 5, 51, 106, 11, 3, 112, 28, 13, 1, 4, 8, 3, 104, 118, 14, 1, 1, 0, 0, 0, 88, 3, 27, 46, 118, 108, 49, 2, 0, 1, 46, 118, 118, 27, 12, 0, 0, 33, 118, 118, 8, 0, 0, 0, 4, 118, 95, 40, 0, 0, 0, 1, 11, 27, 38, 12, 12, 18, 29, 3, 2, 13, 30, 94, 78, 30, 19, 9, 3, 31, 45, 70, 42, 15, 1, 3, 12, 14, 22, 16, 2, 3, 17, 24, 13]",4); create table ivf3(a bigint primary key, b vecf32(128)); load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compression'='gzip'} into table ivf3 fields terminated by ':' parallel 'true'; @@ -29,6 +29,9 @@ load data infile {'filepath'='$resources/vector/sift128_base_10k_2.csv.gz', 'com select count(*) from ivf3; count(*) 20000 +select sleep(5); +sleep(5) +0 create table ivf4(a bigint, b int, c vecf32(3), primary key (a, b)); insert into ivf4 values (0, 1, "[1,2,3]"), (1, 2, "[2,2,3]"), (2, 3, "[1,3,3]"), (3, 4, "[1,2,4]"), (4, 5, "[1,2,5]"), (5,6, NULL); create index idx01 using ivfflat on ivf4(c) op_type "vector_l2_ops" LISTS=1 ASYNC; @@ -43,18 +46,54 @@ select * from ivf1_async order by L2_DISTANCE(b, "[10, 15, 0, 0, 5, 46, 5, 5, 4, a b c 9779 [10, 15, 0, 0, 5, 46, 5, 5, 4, 0, 0, 0, 28, 118, 12, 5, 75, 44, 5, 0, 6, 32, 6, 49, 41, 74, 9, 1, 0, 0, 0, 9, 1, 9, 16, 41, 71, 80, 3, 0, 0, 4, 3, 5, 51, 106, 11, 3, 112, 28, 13, 1, 4, 8, 3, 104, 118, 14, 1, 1, 0, 0, 0, 88, 3, 27, 46, 118, 108, 49, 2, 0, 1, 46, 118, 118, 27, 12, 0, 0, 33, 118, 118, 8, 0, 0, 0, 4, 118, 95, 40, 0, 0, 0, 1, 11, 27, 38, 12, 12, 18, 29, 3, 2, 13, 30, 94, 78, 30, 19, 9, 3, 31, 45, 70, 42, 15, 1, 3, 12, 14, 22, 16, 2, 3, 17, 24, 13] 4 9777 [16, 15, 0, 0, 5, 46, 5, 5, 4, 0, 0, 0, 28, 118, 12, 5, 75, 44, 5, 0, 6, 32, 6, 49, 41, 74, 9, 1, 0, 0, 0, 9, 1, 9, 16, 41, 71, 80, 3, 0, 0, 4, 3, 5, 51, 106, 11, 3, 112, 28, 13, 1, 4, 8, 3, 104, 118, 14, 1, 1, 0, 0, 0, 88, 3, 27, 46, 118, 108, 49, 2, 0, 1, 46, 118, 118, 27, 12, 0, 0, 33, 118, 118, 8, 0, 0, 0, 4, 118, 95, 40, 0, 0, 0, 1, 11, 27, 38, 12, 12, 18, 29, 3, 2, 13, 30, 94, 78, 30, 19, 9, 3, 31, 45, 70, 42, 15, 1, 3, 12, 14, 22, 16, 2, 3, 17, 24, 13] 4 -select * from ivf3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; +select * from ivf3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 10; a b 9999 [14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7] -select * from ivf3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; +9911 [25, 2, 0, 0, 0, 5, 44, 62, 6, 0, 0, 5, 27, 126, 64, 20, 90, 9, 0, 3, 7, 38, 16, 79, 20, 10, 0, 0, 0, 1, 5, 10, 39, 10, 1, 0, 12, 33, 62, 69, 14, 0, 0, 0, 52, 116, 73, 34, 126, 7, 0, 0, 19, 24, 7, 106, 71, 10, 4, 3, 0, 0, 8, 33, 14, 36, 58, 61, 70, 15, 11, 5, 18, 50, 22, 18, 48, 32, 60, 19, 126, 124, 11, 3, 4, 7, 15, 30, 126, 17, 5, 3, 0, 0, 13, 35, 17, 21, 76, 80, 24, 0, 3, 1, 4, 88, 126, 76, 15, 0, 8, 0, 52, 91, 66, 76, 11, 0, 2, 13, 63, 41, 6, 13, 1, 0, 0, 6] +17542 [56, 0, 0, 0, 0, 24, 28, 98, 7, 3, 0, 3, 70, 118, 49, 17, 118, 16, 0, 4, 16, 47, 60, 80, 27, 1, 1, 5, 8, 3, 16, 37, 38, 6, 7, 14, 19, 39, 32, 64, 8, 6, 3, 20, 44, 118, 70, 21, 118, 26, 1, 4, 8, 4, 13, 60, 113, 37, 15, 4, 1, 0, 6, 27, 8, 81, 44, 78, 40, 6, 1, 4, 14, 34, 33, 118, 45, 8, 9, 6, 118, 118, 16, 12, 1, 0, 4, 14, 118, 51, 6, 1, 0, 2, 6, 42, 2, 22, 51, 42, 8, 1, 0, 0, 4, 24, 117, 118, 5, 0, 0, 0, 23, 60, 81, 56, 7, 3, 6, 1, 17, 22, 2, 3, 2, 4, 13, 22] +9927 [17, 3, 0, 0, 4, 24, 48, 34, 7, 0, 0, 1, 39, 105, 44, 15, 126, 0, 0, 0, 6, 21, 9, 96, 28, 3, 0, 0, 0, 1, 3, 28, 42, 16, 4, 5, 26, 56, 30, 35, 7, 1, 0, 3, 59, 62, 53, 45, 126, 21, 0, 0, 19, 12, 5, 82, 86, 9, 2, 0, 0, 1, 15, 37, 3, 9, 27, 86, 118, 15, 5, 7, 15, 62, 31, 13, 13, 16, 41, 8, 126, 126, 7, 4, 2, 11, 12, 7, 112, 21, 4, 5, 1, 10, 24, 25, 22, 17, 125, 97, 23, 1, 1, 3, 5, 69, 126, 90, 2, 0, 6, 0, 65, 70, 57, 99, 13, 0, 1, 12, 62, 24, 9, 26, 11, 0, 0, 8] +18507 [75, 2, 1, 0, 0, 5, 23, 98, 15, 2, 2, 1, 16, 117, 96, 28, 61, 5, 3, 3, 10, 79, 117, 63, 38, 3, 1, 9, 17, 5, 14, 27, 41, 10, 8, 15, 19, 24, 42, 59, 4, 2, 4, 13, 38, 117, 110, 20, 117, 42, 10, 4, 16, 24, 20, 55, 77, 15, 2, 3, 4, 3, 21, 65, 3, 51, 77, 82, 31, 4, 1, 3, 10, 20, 20, 117, 59, 9, 21, 12, 117, 102, 13, 8, 1, 0, 5, 25, 117, 62, 14, 2, 0, 0, 0, 9, 2, 12, 39, 41, 16, 5, 0, 0, 2, 22, 99, 117, 9, 0, 0, 0, 18, 88, 58, 41, 4, 0, 6, 2, 40, 21, 5, 0, 0, 0, 8, 27] +17775 [4, 1, 0, 1, 8, 38, 42, 25, 3, 0, 0, 0, 41, 119, 94, 14, 86, 4, 0, 12, 61, 60, 17, 36, 37, 4, 0, 29, 47, 1, 1, 4, 0, 2, 2, 17, 80, 88, 54, 6, 0, 1, 0, 3, 39, 119, 90, 2, 119, 5, 0, 0, 9, 36, 53, 111, 65, 17, 0, 7, 27, 9, 5, 25, 0, 5, 37, 108, 88, 29, 5, 0, 0, 23, 45, 119, 68, 27, 5, 0, 119, 81, 48, 5, 0, 2, 3, 19, 81, 58, 0, 0, 1, 7, 0, 8, 21, 24, 23, 40, 2, 3, 0, 1, 4, 22, 112, 119, 2, 0, 0, 1, 31, 45, 105, 78, 21, 0, 0, 0, 36, 30, 0, 0, 6, 16, 0, 0] +18804 [34, 0, 0, 2, 12, 3, 9, 88, 11, 0, 0, 0, 7, 116, 71, 74, 65, 0, 0, 0, 8, 101, 41, 70, 54, 0, 0, 0, 0, 9, 8, 39, 13, 4, 8, 8, 89, 34, 14, 28, 12, 6, 2, 4, 34, 116, 116, 30, 116, 10, 0, 0, 0, 20, 56, 113, 116, 6, 0, 0, 11, 9, 3, 81, 6, 26, 20, 42, 81, 26, 2, 0, 6, 32, 95, 91, 70, 26, 3, 2, 114, 87, 41, 3, 0, 0, 1, 24, 116, 38, 0, 0, 18, 35, 1, 26, 16, 27, 23, 25, 5, 1, 1, 0, 0, 4, 91, 102, 7, 0, 0, 0, 28, 59, 67, 24, 0, 0, 0, 0, 46, 45, 1, 0, 24, 31, 0, 1] +17728 [0, 0, 0, 0, 8, 35, 30, 3, 4, 0, 0, 5, 12, 53, 87, 47, 109, 2, 2, 8, 10, 33, 26, 82, 38, 1, 0, 15, 15, 9, 4, 29, 1, 3, 0, 21, 45, 79, 47, 23, 13, 9, 0, 26, 59, 78, 82, 37, 112, 19, 0, 1, 7, 10, 46, 112, 78, 8, 6, 5, 13, 16, 6, 79, 9, 49, 22, 104, 88, 17, 2, 4, 26, 112, 37, 112, 74, 5, 3, 4, 110, 112, 42, 19, 13, 0, 1, 11, 112, 25, 20, 4, 0, 0, 0, 23, 3, 28, 66, 72, 14, 0, 0, 1, 8, 68, 79, 112, 22, 0, 0, 0, 22, 110, 52, 29, 1, 0, 0, 0, 43, 11, 14, 18, 1, 0, 0, 6] +18677 [3, 0, 0, 0, 5, 43, 42, 22, 3, 0, 0, 0, 40, 118, 96, 13, 84, 4, 0, 12, 55, 58, 18, 39, 34, 5, 0, 28, 48, 1, 2, 5, 0, 0, 3, 14, 71, 93, 50, 12, 0, 2, 0, 4, 37, 118, 95, 2, 118, 7, 0, 0, 7, 34, 51, 110, 62, 18, 0, 6, 27, 10, 5, 26, 0, 6, 47, 113, 75, 23, 4, 1, 0, 28, 60, 118, 52, 24, 5, 0, 118, 86, 62, 6, 0, 1, 2, 15, 75, 62, 0, 0, 1, 7, 1, 6, 22, 21, 25, 40, 1, 2, 0, 3, 4, 24, 118, 118, 1, 0, 0, 2, 27, 41, 109, 84, 32, 0, 0, 0, 34, 26, 1, 1, 8, 19, 0, 0] +14097 [13, 3, 3, 2, 6, 22, 79, 43, 17, 7, 20, 11, 41, 96, 72, 21, 46, 0, 2, 4, 41, 63, 19, 59, 31, 2, 3, 2, 3, 5, 20, 36, 31, 31, 21, 17, 16, 28, 56, 56, 15, 0, 4, 34, 44, 120, 120, 34, 120, 10, 0, 0, 1, 39, 41, 90, 119, 20, 8, 3, 1, 0, 2, 25, 95, 53, 38, 44, 45, 9, 0, 2, 22, 16, 19, 120, 120, 16, 2, 7, 120, 84, 21, 10, 3, 0, 1, 32, 77, 14, 0, 0, 0, 0, 23, 57, 7, 18, 47, 28, 53, 6, 0, 0, 2, 62, 87, 49, 71, 7, 0, 0, 17, 88, 120, 34, 0, 0, 1, 6, 2, 0, 33, 47, 1, 0, 31, 23] +select * from ivf3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 10; a b 0 [0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1] -select * from ivf3 order by L2_DISTANCE(b, "[59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18]") ASC LIMIT 1; +2 [0, 1, 5, 3, 44, 40, 20, 14, 10, 100, 63, 7, 44, 47, 9, 6, 7, 70, 114, 82, 11, 5, 3, 4, 30, 16, 33, 55, 5, 0, 0, 4, 104, 46, 12, 2, 8, 5, 40, 66, 85, 117, 117, 5, 7, 3, 1, 6, 0, 62, 108, 86, 51, 22, 2, 0, 7, 1, 15, 117, 95, 2, 1, 12, 117, 33, 4, 2, 0, 0, 3, 56, 117, 20, 3, 0, 0, 40, 78, 93, 0, 1, 2, 5, 24, 86, 96, 16, 0, 0, 0, 77, 75, 10, 19, 7, 22, 8, 12, 7, 0, 0, 3, 44, 35, 11, 2, 0, 0, 10, 55, 117, 17, 9, 12, 2, 1, 14, 34, 31, 0, 1, 6, 10, 12, 4, 23, 10] +6 [0, 42, 55, 4, 16, 26, 24, 10, 1, 91, 100, 12, 42, 70, 8, 0, 17, 48, 111, 73, 19, 5, 2, 2, 68, 23, 13, 15, 6, 2, 1, 27, 98, 32, 3, 1, 5, 22, 93, 48, 111, 111, 109, 4, 14, 32, 33, 24, 1, 42, 83, 108, 98, 43, 28, 1, 25, 1, 4, 83, 67, 5, 4, 48, 111, 41, 15, 2, 0, 0, 7, 55, 105, 18, 3, 0, 0, 34, 105, 111, 8, 2, 3, 13, 29, 61, 78, 17, 8, 0, 0, 48, 61, 40, 20, 7, 23, 45, 9, 1, 0, 0, 0, 9, 30, 29, 13, 11, 8, 1, 6, 57, 8, 2, 4, 19, 18, 29, 21, 64, 0, 0, 2, 18, 44, 45, 11, 2] +17359 [0, 0, 4, 8, 40, 40, 3, 0, 85, 36, 15, 9, 35, 37, 14, 9, 55, 92, 95, 23, 21, 17, 1, 5, 31, 11, 28, 21, 31, 24, 7, 21, 40, 26, 16, 4, 21, 39, 48, 17, 67, 119, 119, 6, 17, 8, 0, 9, 25, 119, 73, 56, 42, 17, 1, 2, 21, 0, 13, 119, 73, 17, 7, 15, 119, 16, 0, 0, 2, 4, 40, 77, 79, 55, 23, 0, 0, 8, 119, 119, 16, 17, 14, 6, 24, 65, 119, 61, 0, 11, 12, 28, 97, 63, 7, 0, 31, 26, 13, 3, 0, 5, 26, 27, 48, 52, 28, 3, 6, 9, 70, 53, 78, 5, 3, 3, 5, 8, 30, 87, 4, 19, 18, 4, 10, 14, 5, 5] +11511 [9, 2, 4, 2, 8, 21, 34, 34, 3, 10, 61, 22, 49, 53, 15, 10, 12, 77, 90, 29, 11, 8, 7, 6, 24, 19, 38, 52, 14, 0, 0, 6, 121, 15, 5, 2, 4, 6, 13, 58, 121, 91, 121, 24, 5, 1, 0, 15, 2, 84, 121, 47, 58, 32, 0, 0, 20, 21, 23, 68, 109, 20, 0, 10, 121, 19, 1, 3, 7, 2, 3, 52, 121, 21, 2, 2, 2, 17, 96, 121, 3, 1, 3, 6, 52, 121, 74, 11, 21, 8, 3, 6, 35, 93, 25, 30, 24, 18, 2, 0, 2, 2, 6, 44, 32, 36, 9, 3, 0, 1, 76, 79, 1, 3, 4, 20, 18, 50, 84, 12, 0, 0, 0, 16, 15, 23, 15, 15] +10610 [24, 15, 3, 0, 13, 15, 10, 11, 15, 68, 102, 36, 54, 36, 9, 3, 58, 62, 119, 77, 5, 8, 5, 34, 56, 19, 21, 10, 18, 10, 14, 38, 53, 42, 24, 6, 14, 6, 10, 31, 119, 119, 44, 6, 2, 8, 4, 8, 24, 59, 101, 103, 36, 23, 3, 6, 26, 13, 18, 89, 97, 13, 9, 6, 119, 36, 13, 8, 14, 12, 13, 25, 119, 24, 4, 5, 6, 9, 31, 119, 15, 16, 7, 6, 26, 65, 56, 41, 2, 2, 0, 22, 119, 73, 6, 0, 16, 9, 3, 9, 15, 19, 38, 29, 32, 0, 0, 7, 9, 21, 82, 119, 22, 16, 0, 0, 0, 21, 90, 61, 7, 13, 6, 30, 27, 18, 6, 1] +17103 [15, 14, 3, 19, 6, 2, 4, 31, 22, 44, 40, 15, 8, 3, 4, 26, 0, 3, 66, 110, 58, 0, 0, 0, 0, 20, 26, 45, 20, 0, 0, 0, 82, 45, 1, 12, 12, 9, 11, 15, 115, 115, 93, 4, 0, 0, 0, 11, 1, 16, 115, 115, 90, 27, 0, 0, 0, 3, 29, 96, 91, 12, 0, 0, 115, 10, 0, 0, 0, 1, 12, 69, 110, 15, 2, 0, 0, 11, 105, 115, 4, 1, 6, 14, 93, 115, 96, 37, 1, 0, 9, 72, 79, 16, 0, 2, 7, 6, 7, 2, 5, 1, 11, 26, 2, 5, 9, 2, 0, 1, 98, 67, 44, 12, 2, 1, 0, 12, 79, 58, 8, 0, 1, 12, 14, 49, 6, 10] +10137 [10, 10, 9, 2, 8, 23, 7, 10, 0, 79, 119, 12, 29, 29, 0, 0, 0, 41, 119, 78, 8, 0, 0, 0, 0, 22, 44, 31, 0, 0, 0, 0, 85, 36, 9, 0, 2, 7, 11, 62, 118, 119, 82, 3, 3, 4, 8, 29, 5, 39, 72, 119, 104, 16, 12, 3, 0, 6, 21, 88, 64, 1, 2, 0, 119, 34, 19, 5, 6, 9, 4, 51, 119, 25, 0, 0, 1, 59, 45, 44, 1, 0, 0, 28, 45, 59, 119, 49, 0, 1, 5, 50, 88, 29, 43, 1, 37, 25, 20, 3, 0, 1, 29, 23, 44, 12, 1, 0, 7, 55, 81, 50, 2, 1, 1, 14, 48, 65, 77, 19, 0, 0, 0, 6, 6, 27, 93, 3] +14236 [18, 32, 14, 12, 56, 63, 51, 6, 49, 53, 88, 50, 111, 30, 9, 8, 89, 107, 55, 49, 44, 1, 7, 31, 0, 6, 26, 54, 33, 2, 0, 0, 63, 29, 28, 19, 5, 21, 31, 24, 102, 111, 111, 19, 9, 7, 3, 5, 6, 111, 91, 67, 88, 25, 8, 0, 0, 10, 47, 85, 72, 6, 1, 0, 81, 5, 5, 8, 1, 3, 27, 111, 111, 17, 2, 2, 3, 29, 48, 111, 13, 2, 2, 7, 38, 83, 71, 30, 2, 8, 19, 29, 61, 17, 10, 2, 56, 5, 0, 1, 0, 0, 5, 52, 29, 1, 0, 0, 1, 12, 54, 74, 63, 0, 2, 4, 3, 5, 32, 66, 8, 7, 20, 16, 11, 3, 4, 16] +13709 [6, 30, 10, 18, 16, 2, 0, 2, 0, 83, 90, 22, 24, 5, 3, 0, 6, 66, 124, 28, 15, 4, 0, 0, 0, 8, 63, 50, 50, 5, 0, 0, 94, 44, 11, 12, 7, 1, 1, 34, 77, 124, 124, 28, 4, 0, 10, 33, 3, 41, 124, 84, 81, 18, 3, 7, 0, 1, 47, 106, 124, 8, 0, 0, 124, 20, 2, 4, 4, 3, 0, 22, 124, 21, 1, 0, 1, 9, 28, 101, 23, 4, 20, 11, 58, 124, 24, 20, 0, 3, 33, 45, 51, 41, 0, 0, 57, 3, 1, 0, 0, 2, 1, 44, 51, 1, 0, 0, 0, 5, 40, 111, 10, 10, 28, 10, 13, 34, 25, 43, 0, 2, 21, 26, 7, 10, 5, 0] +select * from ivf3 order by L2_DISTANCE(b, "[59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18]") ASC LIMIT 10; a b 10000 [59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18] -select * from ivf3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25]") ASC LIMIT 1; +10788 [82, 0, 0, 0, 0, 0, 20, 51, 108, 0, 0, 0, 64, 54, 21, 60, 33, 0, 0, 0, 21, 29, 33, 114, 0, 0, 0, 0, 46, 18, 17, 13, 114, 8, 0, 1, 1, 0, 6, 29, 114, 0, 0, 0, 114, 114, 27, 56, 72, 0, 0, 0, 25, 36, 75, 114, 21, 1, 2, 9, 28, 28, 58, 80, 51, 13, 2, 1, 11, 6, 4, 18, 49, 20, 10, 36, 114, 64, 13, 19, 58, 62, 38, 6, 13, 7, 18, 48, 111, 24, 39, 5, 1, 5, 17, 41, 47, 24, 1, 1, 9, 6, 0, 1, 47, 73, 50, 88, 9, 0, 0, 0, 7, 114, 112, 21, 0, 0, 0, 0, 39, 22, 95, 25, 0, 0, 0, 0] +12438 [87, 8, 0, 24, 43, 3, 0, 32, 55, 3, 0, 2, 68, 21, 38, 87, 39, 0, 0, 6, 13, 12, 45, 108, 12, 0, 3, 24, 49, 13, 4, 22, 86, 11, 0, 10, 47, 18, 5, 49, 42, 2, 2, 17, 113, 42, 46, 90, 91, 14, 7, 5, 0, 18, 113, 113, 69, 3, 1, 17, 56, 34, 18, 72, 72, 10, 12, 14, 43, 13, 0, 39, 57, 32, 37, 113, 89, 9, 4, 23, 63, 113, 113, 27, 13, 7, 14, 11, 45, 22, 19, 22, 31, 23, 23, 23, 58, 32, 11, 5, 2, 0, 0, 14, 55, 89, 69, 76, 6, 0, 0, 0, 35, 91, 58, 31, 43, 20, 33, 7, 0, 0, 4, 34, 62, 9, 7, 5] +14486 [37, 0, 0, 0, 1, 20, 19, 31, 65, 0, 0, 0, 47, 83, 38, 66, 50, 1, 0, 0, 10, 69, 55, 72, 0, 0, 1, 13, 35, 37, 14, 12, 113, 2, 0, 0, 24, 17, 12, 19, 68, 2, 0, 9, 127, 72, 23, 77, 37, 11, 3, 1, 9, 46, 111, 127, 29, 9, 4, 5, 8, 15, 35, 68, 127, 20, 0, 3, 32, 2, 0, 2, 63, 26, 29, 91, 127, 3, 1, 7, 70, 127, 49, 35, 24, 0, 4, 24, 67, 28, 16, 28, 26, 2, 3, 11, 79, 33, 0, 0, 11, 4, 0, 0, 50, 66, 33, 27, 67, 16, 0, 1, 17, 127, 82, 59, 23, 0, 0, 0, 11, 17, 18, 51, 28, 0, 0, 0] +14448 [51, 0, 1, 2, 1, 8, 8, 97, 44, 1, 0, 7, 69, 98, 11, 33, 89, 17, 2, 0, 10, 14, 37, 96, 11, 3, 2, 13, 80, 30, 14, 19, 81, 7, 15, 11, 13, 19, 7, 69, 22, 0, 0, 2, 115, 120, 40, 50, 50, 10, 1, 0, 4, 21, 120, 120, 104, 37, 30, 18, 22, 9, 36, 82, 28, 6, 9, 14, 18, 16, 16, 35, 7, 11, 73, 81, 63, 48, 8, 8, 76, 120, 107, 18, 3, 5, 7, 16, 120, 80, 13, 1, 1, 4, 1, 8, 17, 3, 2, 2, 4, 2, 10, 21, 53, 22, 26, 14, 1, 0, 1, 15, 74, 69, 87, 20, 2, 0, 0, 6, 63, 28, 18, 7, 7, 12, 9, 6] +9691 [98, 0, 0, 0, 0, 0, 5, 42, 113, 0, 0, 0, 64, 68, 8, 73, 43, 0, 0, 1, 22, 27, 21, 113, 6, 0, 0, 3, 49, 19, 10, 9, 108, 13, 1, 2, 2, 0, 2, 24, 109, 0, 0, 0, 113, 113, 14, 81, 86, 0, 0, 0, 23, 25, 52, 113, 19, 0, 0, 10, 42, 12, 57, 71, 39, 12, 1, 0, 16, 6, 4, 16, 51, 21, 9, 48, 113, 38, 12, 20, 68, 40, 27, 10, 12, 6, 18, 71, 107, 14, 18, 10, 5, 3, 19, 61, 45, 25, 0, 0, 6, 8, 0, 0, 56, 62, 47, 98, 7, 0, 0, 0, 3, 112, 113, 35, 0, 0, 0, 0, 68, 24, 67, 21, 0, 0, 0, 2] +13780 [48, 0, 0, 2, 3, 8, 11, 94, 36, 2, 0, 13, 77, 88, 9, 28, 97, 22, 4, 0, 9, 13, 22, 81, 13, 3, 1, 11, 74, 39, 9, 17, 83, 4, 14, 9, 10, 20, 9, 88, 24, 0, 0, 0, 100, 122, 40, 52, 43, 7, 0, 0, 3, 23, 122, 122, 80, 32, 25, 21, 32, 11, 48, 88, 35, 4, 16, 10, 23, 19, 18, 31, 5, 12, 74, 69, 75, 67, 13, 7, 69, 122, 97, 14, 3, 6, 12, 30, 122, 85, 13, 1, 1, 3, 1, 14, 20, 3, 2, 2, 7, 2, 12, 18, 48, 18, 39, 17, 1, 1, 2, 12, 69, 72, 99, 21, 1, 0, 0, 6, 69, 32, 18, 9, 3, 10, 9, 5] +16342 [90, 47, 7, 2, 9, 24, 26, 26, 23, 12, 1, 0, 56, 116, 76, 116, 6, 0, 3, 19, 58, 20, 103, 116, 25, 0, 0, 8, 50, 35, 20, 53, 14, 5, 13, 28, 38, 23, 26, 16, 6, 2, 7, 34, 116, 67, 42, 68, 48, 27, 14, 5, 13, 9, 116, 116, 65, 26, 27, 23, 22, 18, 35, 63, 40, 7, 5, 22, 66, 20, 27, 20, 38, 23, 27, 60, 116, 31, 0, 24, 97, 98, 54, 4, 3, 0, 0, 9, 104, 53, 34, 19, 0, 0, 2, 24, 25, 26, 7, 7, 33, 4, 0, 6, 29, 40, 29, 49, 80, 3, 1, 7, 49, 111, 44, 0, 0, 0, 0, 1, 28, 38, 29, 21, 8, 0, 1, 9] +5079 [108, 3, 0, 0, 0, 0, 2, 30, 78, 0, 0, 0, 1, 26, 113, 71, 5, 0, 0, 0, 1, 47, 105, 51, 13, 0, 0, 3, 8, 27, 48, 52, 73, 15, 2, 3, 2, 0, 3, 19, 31, 10, 6, 11, 90, 58, 106, 57, 45, 3, 1, 0, 5, 29, 115, 115, 115, 10, 5, 4, 10, 14, 13, 52, 109, 30, 0, 2, 19, 3, 0, 1, 51, 56, 23, 28, 115, 42, 2, 3, 73, 115, 39, 1, 10, 2, 4, 28, 84, 95, 22, 5, 12, 9, 8, 16, 93, 20, 5, 2, 8, 0, 0, 0, 48, 48, 68, 68, 56, 2, 0, 2, 36, 115, 52, 15, 13, 2, 5, 11, 10, 28, 9, 8, 31, 16, 25, 23] +4923 [75, 0, 0, 0, 0, 0, 9, 50, 27, 0, 0, 0, 4, 49, 118, 79, 4, 0, 0, 0, 1, 36, 118, 87, 10, 0, 0, 1, 3, 48, 57, 36, 70, 32, 0, 5, 10, 1, 3, 16, 21, 24, 0, 16, 118, 54, 59, 39, 35, 1, 0, 0, 7, 13, 118, 118, 91, 5, 9, 8, 2, 11, 20, 56, 118, 32, 0, 0, 35, 7, 0, 1, 34, 43, 13, 21, 118, 49, 1, 2, 52, 104, 43, 2, 9, 2, 1, 25, 93, 100, 24, 3, 0, 0, 0, 29, 96, 18, 6, 6, 17, 2, 0, 0, 20, 39, 79, 71, 64, 4, 0, 0, 22, 118, 74, 7, 5, 0, 0, 3, 20, 75, 24, 5, 4, 1, 4, 19] +select * from ivf3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25]") ASC LIMIT 10; a b 19999 [0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25] +2638 [0, 0, 0, 14, 24, 78, 53, 31, 5, 1, 0, 12, 32, 108, 88, 26, 11, 1, 1, 8, 32, 40, 115, 76, 50, 0, 3, 13, 35, 41, 14, 106, 5, 0, 0, 9, 11, 59, 76, 65, 6, 0, 0, 20, 85, 112, 49, 19, 115, 11, 5, 13, 18, 9, 40, 76, 72, 19, 56, 73, 6, 4, 2, 50, 39, 27, 17, 49, 14, 1, 3, 21, 10, 8, 70, 115, 31, 5, 1, 1, 115, 45, 26, 70, 10, 0, 0, 16, 87, 64, 25, 28, 0, 0, 0, 2, 58, 32, 11, 8, 7, 0, 0, 8, 30, 19, 107, 91, 2, 0, 0, 15, 61, 64, 81, 101, 3, 0, 0, 0, 38, 38, 5, 6, 7, 3, 5, 4] +14105 [0, 0, 0, 0, 0, 20, 62, 33, 2, 0, 0, 0, 0, 67, 85, 36, 16, 2, 3, 1, 0, 5, 70, 77, 2, 0, 2, 3, 0, 15, 47, 13, 2, 5, 7, 6, 5, 37, 93, 39, 44, 6, 10, 10, 5, 65, 121, 52, 129, 35, 30, 29, 2, 2, 22, 85, 40, 10, 24, 82, 22, 0, 8, 12, 8, 53, 72, 45, 2, 2, 0, 2, 37, 54, 129, 88, 4, 3, 3, 4, 129, 26, 38, 41, 3, 0, 0, 69, 83, 8, 8, 99, 46, 0, 0, 14, 31, 34, 32, 29, 0, 0, 0, 8, 68, 60, 79, 98, 1, 0, 0, 4, 126, 30, 44, 129, 5, 0, 0, 10, 77, 20, 15, 31, 7, 0, 0, 4] +10453 [17, 5, 3, 17, 45, 32, 17, 11, 1, 0, 0, 3, 87, 120, 120, 30, 18, 5, 15, 44, 74, 32, 51, 60, 16, 4, 7, 19, 15, 5, 7, 93, 0, 0, 1, 9, 71, 87, 95, 34, 17, 0, 0, 11, 120, 77, 29, 20, 120, 17, 13, 52, 7, 3, 7, 58, 56, 32, 20, 89, 3, 0, 0, 19, 0, 2, 68, 51, 11, 21, 21, 8, 5, 2, 32, 120, 59, 15, 5, 3, 120, 7, 17, 30, 7, 0, 0, 73, 84, 16, 8, 33, 6, 1, 1, 17, 1, 4, 98, 47, 0, 0, 0, 0, 4, 11, 79, 120, 4, 0, 0, 0, 74, 17, 54, 104, 6, 0, 0, 6, 57, 18, 16, 6, 0, 0, 0, 4] +2124 [0, 0, 0, 1, 5, 54, 60, 71, 2, 0, 0, 3, 28, 120, 91, 32, 14, 0, 0, 5, 24, 39, 120, 103, 88, 1, 0, 7, 23, 36, 21, 84, 19, 3, 1, 25, 19, 24, 29, 60, 15, 0, 0, 29, 82, 78, 30, 18, 120, 14, 10, 20, 15, 8, 17, 56, 102, 15, 38, 82, 4, 5, 2, 74, 35, 48, 23, 46, 25, 0, 0, 5, 19, 9, 51, 120, 35, 2, 0, 0, 120, 75, 11, 57, 10, 0, 0, 2, 68, 55, 38, 48, 1, 0, 0, 4, 64, 32, 16, 5, 7, 0, 0, 13, 30, 9, 77, 120, 12, 0, 0, 11, 77, 101, 43, 77, 11, 0, 0, 0, 22, 29, 7, 15, 5, 3, 6, 12] +16086 [0, 0, 1, 0, 10, 77, 118, 14, 0, 0, 3, 2, 0, 99, 118, 14, 49, 2, 0, 7, 13, 43, 118, 86, 24, 5, 0, 35, 109, 18, 5, 25, 0, 0, 0, 1, 68, 60, 30, 3, 10, 4, 1, 2, 32, 42, 53, 11, 118, 84, 13, 2, 5, 19, 18, 49, 73, 49, 10, 60, 76, 2, 17, 72, 3, 9, 37, 28, 43, 15, 0, 1, 37, 7, 23, 66, 33, 14, 4, 15, 118, 60, 19, 17, 25, 2, 8, 64, 60, 50, 17, 30, 39, 4, 12, 66, 0, 32, 110, 33, 6, 0, 0, 0, 8, 8, 57, 118, 21, 2, 0, 4, 118, 19, 9, 66, 5, 0, 1, 55, 59, 73, 23, 9, 2, 0, 0, 4] +3941 [2, 0, 0, 16, 55, 41, 57, 49, 5, 0, 0, 0, 52, 109, 75, 45, 26, 2, 4, 52, 65, 20, 33, 53, 34, 0, 0, 19, 13, 1, 3, 30, 20, 1, 2, 26, 117, 22, 33, 52, 33, 2, 0, 23, 86, 21, 8, 22, 119, 9, 8, 87, 45, 1, 1, 50, 76, 5, 2, 105, 52, 0, 0, 21, 22, 15, 21, 87, 28, 9, 5, 2, 43, 22, 16, 97, 53, 0, 0, 1, 119, 25, 5, 53, 31, 0, 0, 36, 92, 12, 10, 119, 60, 0, 0, 11, 5, 23, 43, 94, 2, 0, 0, 0, 19, 43, 57, 119, 9, 0, 0, 3, 109, 36, 55, 84, 7, 0, 0, 19, 64, 8, 19, 78, 6, 0, 0, 12] +19566 [3, 20, 5, 0, 4, 49, 117, 15, 6, 10, 2, 0, 25, 117, 117, 17, 37, 12, 4, 0, 9, 57, 44, 56, 29, 15, 13, 2, 5, 7, 5, 12, 5, 0, 2, 6, 54, 60, 50, 16, 67, 14, 26, 29, 51, 43, 77, 34, 117, 42, 18, 1, 0, 4, 16, 82, 92, 33, 0, 34, 53, 12, 3, 15, 27, 12, 25, 43, 30, 8, 10, 5, 33, 33, 117, 81, 18, 4, 6, 15, 117, 21, 31, 42, 6, 7, 10, 77, 117, 9, 3, 35, 72, 2, 0, 35, 92, 10, 14, 7, 3, 0, 0, 2, 39, 30, 114, 52, 1, 1, 1, 9, 55, 30, 100, 117, 1, 1, 1, 13, 103, 21, 14, 25, 17, 0, 0, 10] +19488 [1, 7, 2, 0, 2, 22, 114, 52, 4, 8, 1, 0, 29, 119, 119, 27, 26, 10, 4, 0, 14, 72, 56, 70, 24, 15, 16, 4, 6, 4, 5, 22, 9, 5, 5, 0, 33, 28, 33, 20, 44, 11, 17, 25, 97, 62, 59, 32, 119, 46, 19, 2, 0, 1, 20, 89, 96, 27, 6, 20, 35, 14, 2, 20, 16, 10, 8, 19, 29, 9, 8, 4, 30, 25, 60, 94, 36, 8, 9, 9, 119, 23, 23, 22, 0, 7, 17, 83, 119, 13, 0, 32, 75, 1, 2, 44, 54, 7, 5, 8, 10, 3, 0, 12, 72, 20, 114, 86, 0, 0, 0, 17, 73, 20, 75, 119, 2, 1, 2, 15, 119, 18, 7, 26, 27, 0, 0, 16] +19604 [2, 1, 0, 0, 7, 41, 102, 42, 10, 1, 0, 2, 27, 120, 120, 30, 55, 16, 10, 0, 5, 32, 37, 75, 27, 15, 15, 2, 11, 12, 3, 11, 6, 3, 2, 4, 49, 32, 14, 15, 64, 25, 17, 30, 72, 44, 21, 30, 120, 50, 15, 0, 0, 0, 7, 73, 79, 22, 10, 25, 67, 20, 1, 13, 30, 11, 8, 39, 25, 8, 6, 4, 30, 47, 75, 110, 22, 7, 5, 11, 120, 20, 13, 40, 4, 8, 12, 83, 120, 5, 1, 37, 114, 1, 1, 36, 73, 12, 4, 8, 6, 2, 0, 12, 64, 31, 88, 89, 0, 0, 1, 10, 94, 29, 66, 120, 0, 1, 1, 15, 107, 15, 6, 42, 35, 0, 0, 10] select *, L2_DISTANCE(c, "[2,2,3]") from ivf4 order by L2_DISTANCE(c, "[2,2,3]") LIMIT 6; a b c L2_DISTANCE(c, [2,2,3]) 1 2 [2, 2, 3] 0.0 diff --git a/test/distributed/cases/vector/vector_ivf_async.sql b/test/distributed/cases/vector/vector_ivf_async.sql index 572e29ea411b3..03e6e9a374745 100644 --- a/test/distributed/cases/vector/vector_ivf_async.sql +++ b/test/distributed/cases/vector/vector_ivf_async.sql @@ -36,6 +36,8 @@ load data infile {'filepath'='$resources/vector/sift128_base_10k_2.csv.gz', 'com select count(*) from ivf3; +select sleep(5); + -- End create ivf3 @@ -71,14 +73,13 @@ select * from ivf1_async order by L2_DISTANCE(b, "[10, 15, 0, 0, 5, 46, 5, 5, 4, -- select ivf3 -select * from ivf3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; - -select * from ivf3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; +select * from ivf3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 10; +select * from ivf3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 10; -select * from ivf3 order by L2_DISTANCE(b, "[59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18]") ASC LIMIT 1; +select * from ivf3 order by L2_DISTANCE(b, "[59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18]") ASC LIMIT 10; -select * from ivf3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25]") ASC LIMIT 1; +select * from ivf3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25]") ASC LIMIT 10; -- end ivf3 @@ -94,6 +95,3 @@ select *, L2_DISTANCE(c, "[2,2,3]") from ivf4 order by L2_DISTANCE(c, "[2,2,3]") drop table ivf1_async; drop table ivf3; drop table ivf4; - - -