1 SELECT set_smlar_limit(0.6);
11 epoch2timestamp(v)::timestamptz::timetz
13 generate_series(1, t) as v
17 generate_series(1, 200) as t;
18 SELECT t, smlar(v, to_tsp_array('{10,9,8,7,6,5,4,3,2,1}')::timestamptz[]::timetz[]) AS s FROM test_timetz WHERE v % to_tsp_array('{10,9,8,7,6,5,4,3,2,1}')::timestamptz[]::timetz[] ORDER BY s DESC, t;
47 SELECT t, smlar(v, to_tsp_array('{50,49,8,7,6,5,4,33,2,1}')::timestamptz[]::timetz[]) AS s FROM test_timetz WHERE v % to_tsp_array('{50,49,8,7,6,5,4,33,2,1}')::timestamptz[]::timetz[] ORDER BY s DESC, t;
60 CREATE INDEX idx_test_timetz ON test_timetz USING gist (v _timetz_sml_ops);
61 SET enable_seqscan=off;
62 SELECT t, smlar(v, to_tsp_array('{10,9,8,7,6,5,4,3,2,1}')::timestamptz[]::timetz[]) AS s FROM test_timetz WHERE v % to_tsp_array('{10,9,8,7,6,5,4,3,2,1}')::timestamptz[]::timetz[] ORDER BY s DESC, t;
91 SELECT t, smlar(v, to_tsp_array('{50,49,8,7,6,5,4,33,2,1}')::timestamptz[]::timetz[]) AS s FROM test_timetz WHERE v % to_tsp_array('{50,49,8,7,6,5,4,33,2,1}')::timestamptz[]::timetz[] ORDER BY s DESC, t;
104 DROP INDEX idx_test_timetz;
105 CREATE INDEX idx_test_timetz ON test_timetz USING gin (v _timetz_sml_ops);
106 SELECT t, smlar(v, to_tsp_array('{10,9,8,7,6,5,4,3,2,1}')::timestamptz[]::timetz[]) AS s FROM test_timetz WHERE v % to_tsp_array('{10,9,8,7,6,5,4,3,2,1}')::timestamptz[]::timetz[] ORDER BY s DESC, t;
135 SELECT t, smlar(v, to_tsp_array('{50,49,8,7,6,5,4,33,2,1}')::timestamptz[]::timetz[]) AS s FROM test_timetz WHERE v % to_tsp_array('{50,49,8,7,6,5,4,33,2,1}')::timestamptz[]::timetz[] ORDER BY s DESC, t;
148 SET enable_seqscan=on;