Hi,
If I have a table like...
CREATE TABLE apa
(
objectid SERIAL PRIMARY KEY NOT NULL
,created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
,somedata text
)
WITHOUT OIDS;
...where if rowX har higher objectid than rowY, it is implied that rowX
has a later created_at then rowY.
select
objectid
from
apa
where
created_at > now() - interval '1 day'
order by
objectid desc;
In this select, it would have been nice to dodge the full table scan
without adding an index to created_at. Is this possible somehow?
Best regards,
Marcus