News for hackers. Stuff that matters.
Re:ULIDs and Primary Keys by HumanOstrich on Friday April 12, 2024 @05:48PM (#40018040)
Hot page?

Using a monotonically increasing PK would cause pages in the index to be allocated and filled sequentially, increasing throughput.

Using random UUIDs would lead to page-splitting and partially-filled pages everywhere, negatively impacting performance and size-on-disk.

Re:ULIDs and Primary Keys by rileymat2 on Friday April 12, 2024 @06:08PM (#40018182)
Not always, this article describes the problem: https://learn.microsoft.com/en-us/troubleshoot/sql/database-...
Re:ULIDs and Primary Keys by hobs on Friday April 12, 2024 @07:26PM (#40018673)
Exactly, with one big insert its better to have a sequential value, for many small ones its often better to not.

As with all databases, measure before you cut.

Re:ULIDs and Primary Keys by erik_seaberg on Friday April 12, 2024 @06:14PM (#40018221)
The way to take advantage of the bandwidth of multiple storage devices is to distribute concurrent writes across them, rather than forcing everything to commit sequentially using contended locks or rollbacks.
Re:ULIDs and Primary Keys by sgarland on Saturday April 13, 2024 @07:59AM (#40022551)
The DB (or any application) should not have any need to know what devices are underneath its mount point. If you’re striping across disks, that’s a device (or filesystem, for ZFS) level implementation.