10 rows, index_granularity = 8192, GRANULARITY = 1 million --> 1 granule, 1 indexed block 5 [0,2] 0 6 [0,2.1] 0.09999990463256836 7 [0,2.2] 0.20000004768371582 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 1/1 Skip Name: idx Description: vector_similarity GRANULARITY 100000000 Parts: 1/1 Granules: 1/1 12 rows, index_granularity = 3, GRANULARITY = 2 --> 4 granules, 2 indexed block 6 [0,2] 0 7 [0,2.1] 0.09999990463256836 8 [0,2.2] 0.20000004768371582 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 2/4 Special cases -- Non-default metric, hnsw_max_connections_per_layer, hnsw_candidate_list_size_for_construction 6 [1,9.3] 0.005731362878640178 4 [2.4,5.2] 0.09204062768384846 1 [2,3.2] 0.15200169244542905 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 -- Setting "max_limit_for_ann_queries" Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 -- Test all distance metrics x all quantization 1 [2,3.2] 2.3323807824711897 4 [2.4,5.2] 3.9999999046325727 2 [4.2,3.4] 4.427188573446585 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_l2_f64) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 4/4 1 [2,3.2] 2.3323807824711897 4 [2.4,5.2] 3.9999999046325727 2 [4.2,3.4] 4.427188573446585 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_l2_f32) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 4/4 1 [2,3.2] 2.3323807824711897 4 [2.4,5.2] 3.9999999046325727 2 [4.2,3.4] 4.427188573446585 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_l2_f16) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 4/4 1 [2,3.2] 2.3323807824711897 4 [2.4,5.2] 3.9999999046325727 2 [4.2,3.4] 4.427188573446585 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_l2_bf16) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 4/4 1 [2,3.2] 2.3323807824711897 4 [2.4,5.2] 3.9999999046325727 2 [4.2,3.4] 4.427188573446585 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_l2_i8) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 6 [1,9.3] 0.005731362878640178 4 [2.4,5.2] 0.09204062768384846 1 [2,3.2] 0.15200169244542905 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_cos_f64) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 6 [1,9.3] 0.005731362878640178 4 [2.4,5.2] 0.09204062768384846 1 [2,3.2] 0.15200169244542905 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_cos_f32) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 6 [1,9.3] 0.005731362878640178 4 [2.4,5.2] 0.09204062768384846 1 [2,3.2] 0.15200169244542905 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_cos_f16) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 6 [1,9.3] 0.005731362878640178 4 [2.4,5.2] 0.09204062768384846 1 [2,3.2] 0.15200169244542905 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_cos_bf16) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 6 [1,9.3] 0.005731362878640178 4 [2.4,5.2] 0.09204062768384846 1 [2,3.2] 0.15200169244542905 Expression (Projection) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) Expression (Before ORDER BY) ReadFromMergeTree (default.tab_cos_i8) Indexes: PrimaryKey Condition: true Parts: 1/1 Granules: 4/4 Skip Name: idx Description: vector_similarity GRANULARITY 2 Parts: 1/1 Granules: 3/4 -- Index on Array(Float64) column 6 [0,2] 0 7 [0,2.1] 0.10000000000000009 8 [0,2.2] 0.20000000000000018