The following scenario is not planned properly. Since idx_x_y contains a varchar it will be a tree index. The execution plan is assuming a hash index will be created (it does not appear to be checking index column data types and assumes hash if "tree" is not in the index name) so it is doing sequential scanning. If I create the index as idx_x_y_tree then the proper execution plan is generated (index scan).
create table t (
(x varchar(40) not null,
y bigint not null);
create index idx_x_y on t(x,ts);
select * from t where x = ? and y >= ? and y <= ?;