I have an table which has an daterange column. I want to select rows that contain date of today.
select * from mytable where drange @> now()::date
the @> operator is true if range contains element
indexing of range types is made with the GiST index
so I created an index CREATE INDEX my_idx ON mytable USING gist (drange)
but explain select * from mytable where drange @> now()::date always returns
Seq Scan on mytable (cost=0.00..1051.82 rows=26104 width=38)
Filter: (drange @> (now())::date)