2 ms·
SELECT * FROM forum_post WHERE created_at > $DATE AND created_at < $DATE If you were using UUIDv7, you could even use that to get the created_at [0], although
by sgarland 3y ago
SELECT * FROM forum_post WHERE created_at > $DATE AND created_at < $DATE
If you were using UUIDv7, you could even use that to get the created_at [0], although you'd likely lose the indexing unless you made a functional index on it, like this:
CREATE INDEX foo_ctime_idx ON foo(extract_timestamp_from_uuid_v7(uuid_v7_col))
[0]: https://stackoverflow.com/a/75869619 https://stackoverflow.com/a/75869619
- ndriscoll 3y agoIt would make more sense to make `timestamp_to_uuid_v7` with high bits 0 and use your PK index.