UUID v4 vs UUID v7 vs Snowflake — Pick the Right Primary Key
Your primary key decides how every insert lands in the index.
Storage engines, indexes, query plans, keys and the cost of every write.
Your primary key decides how every insert lands in the index.
The index existed. The query was written so the database could not use it.
Why RocksDB, Cassandra and ClickHouse write so fast, and what they pay for it later.
How money gets charged twice, and the designs that stop it
What happens inside the storage engine when you write a row
The code was inside a transaction, and it still sold three tickets when only one was left.
Page 1 loads in 8 ms. Page 5,000 takes four seconds, and the index is not the problem.
A data structure that is wrong on purpose, and saves your disk because of it.
Inserts fail with 'Duplicate entry 2147483647', and nobody inserted a duplicate.
A key with TTL zero can still use memory. Here is why.
Why RocksDB, Cassandra and ClickHouse write so fast, and what they pay for it later.
"Let the database handle it" works until the write rate grows a hundred times.
Your primary key decides how every insert lands in the index.
More connections usually make a slow database slower.
DELETE looks like the simplest statement. Under concurrent load it is the most expensive one.
The index existed. The query was written so the database could not use it.
One user could see 100,000 devices. Every obvious way to filter for them failed.
The index was bigger than the data, and every query paid for it.