1 set extra_float_digits =0;
2 SELECT set_smlar_limit(0.6);
14 generate_series(1, t) as v
18 generate_series(1, 200) as t;
19 SELECT t, smlar(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_float4 WHERE v % '{10,9,8,7,6,5,4,3,2,1}' ORDER BY s DESC, t;
48 SELECT t, smlar(v, '{50,49,8,7,6,5,4,33,2,1}') AS s FROM test_float4 WHERE v % '{50,49,8,7,6,5,4,33,2,1}' ORDER BY s DESC, t;
61 CREATE INDEX idx_test_float4 ON test_float4 USING gist (v _float4_sml_ops);
62 SET enable_seqscan=off;
63 SELECT t, smlar(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_float4 WHERE v % '{10,9,8,7,6,5,4,3,2,1}' ORDER BY s DESC, t;
92 SELECT t, smlar(v, '{50,49,8,7,6,5,4,33,2,1}') AS s FROM test_float4 WHERE v % '{50,49,8,7,6,5,4,33,2,1}' ORDER BY s DESC, t;
105 DROP INDEX idx_test_float4;
106 CREATE INDEX idx_test_float4 ON test_float4 USING gin (v _float4_sml_ops);
107 SELECT t, smlar(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_float4 WHERE v % '{10,9,8,7,6,5,4,3,2,1}' ORDER BY s DESC, t;
136 SELECT t, smlar(v, '{50,49,8,7,6,5,4,33,2,1}') AS s FROM test_float4 WHERE v % '{50,49,8,7,6,5,4,33,2,1}' ORDER BY s DESC, t;
149 SET enable_seqscan=on;