The Order of Data: defaults, performance, determinism & paging
Summary
The article analyzes default ordering behavior when ORDER BY is omitted across PostgreSQL, MySQL, and MongoDB, showing that defaults are not guaranteed and can shift due to inserts, updates, deletes, VACUUM, or indexing. It demonstrates performance implications of sorting on unindexed columns and argues for deterministic paging using unique keys or composite keys, while advocating keyset/seek pagination for reliability and better performance.