I have what seems to be a pretty simple scenario but for some reason my query always does a seq scan and doesn't use the sortkey defined for the table.
SELECT *
FROM table1
WHERE md_event_time between '2017-07-23 00:00:00' AND '2017-07-27 23:59:00'
The field in the where clause is showing up as the sortkey in the table info. Explain:
XN Seq Scan on table1 (cost=0.00..0.00 rows=1 width=20)
Filter: ((md_event_time <= '2017-07-27 23:59:00'::timestamp without time zone) AND
(md_event_time >= '2017-07-23 00:00:00'::timestamp without time zone))
Any help is appreciated.