1 set extra_float_digits =0;
2 SELECT set_smlar_limit(0.6);
10 generate_series(1, t) as v
14 generate_series(1, 200) as t;
17 SELECT t, smlar(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_int4 WHERE v % '{10,9,8,7,6,5,4,3,2,1}' ORDER BY s DESC, t;
18 SELECT t, smlar(v, '{50,49,8,7,6,5,4,33,2,1}') AS s FROM test_int4 WHERE v % '{50,49,8,7,6,5,4,33,2,1}' ORDER BY s DESC, t;
20 CREATE INDEX idx_test_int4 ON test_int4 USING gist (v _int4_sml_ops);
22 SET enable_seqscan=off;
24 SELECT t, smlar(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_int4 WHERE v % '{10,9,8,7,6,5,4,3,2,1}' ORDER BY s DESC, t;
25 SELECT t, smlar(v, '{50,49,8,7,6,5,4,33,2,1}') AS s FROM test_int4 WHERE v % '{50,49,8,7,6,5,4,33,2,1}' ORDER BY s DESC, t;
27 DROP INDEX idx_test_int4;
28 CREATE INDEX idx_test_int4 ON test_int4 USING gin (v _int4_sml_ops);
30 SELECT t, smlar(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_int4 WHERE v % '{10,9,8,7,6,5,4,3,2,1}' ORDER BY s DESC, t;
31 SELECT t, smlar(v, '{50,49,8,7,6,5,4,33,2,1}') AS s FROM test_int4 WHERE v % '{50,49,8,7,6,5,4,33,2,1}' ORDER BY s DESC, t;
33 SET enable_seqscan=on;