I tried using ideas from this question and added index
CREATE INDEX idx_test_ranges ON sometable (start,stop DESC, payload);
But query
select count(id) from sometable where start > 1326948385000 and stop < 1326948385001;
remains very slow. Is there a way to speed up ranged queries in Aurora?
Update. Should I switch to Postgress engine?
Switched to Postgress engine and used
tsrange
field andgist
index.