Rendered at 16:59:58 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
matharmin 1 days ago [-]
I'd assume it's common knowledge that you cannot paginate using OFFSET + LIMIT unless you use ORDER BY on an unique set of columns, no matter what database you're using. The only exception is when the database provides an explicit order guarantee without the ORDER BY, such as the case with `preserve_insertion_order = true` here.
sroussey 1 days ago [-]
Even then, that does not work if new records are being inserted.
maest 14 hours ago [-]
You handle this by paginating inside a transaction
sroussey 13 hours ago [-]
That does not work for web apps, mobile, etc
ndr 6 hours ago [-]
Unless I grossly misunderstood your point, you're bound to see stale data. Such is the nature of distributed systems.
RobinL 1 days ago [-]
There's also a pseudocolumn called rowid that's worth knowing about for similar purposes but on duckdb tables:
https://duckdb.org/docs/lts/sql/statements/select#:~:text=Ro...