1 SELECT set_smlar_limit(0.6);
9 generate_series(1, t) as v
13 generate_series(1, 200) as t;
16 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;
17 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;
19 CREATE INDEX idx_test_int4 ON test_int4 USING gist (v _int4_sml_ops);
21 SET enable_seqscan=off;
23 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;
24 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;
26 DROP INDEX idx_test_int4;
27 CREATE INDEX idx_test_int4 ON test_int4 USING gin (v _int4_sml_ops);
29 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;
30 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;
32 SET enable_seqscan=on;