Plate III · Filed under
Performance
Performance
6 entries
- 001
PostgreSQL composite indexes: which column goes first
A multicolumn B-tree sorts by its first column, then its second. Why (a, b) and (b, a) are different indexes, and the rule that decides the order.
PostgreSQLDatabasesIndexingPerformance - 002
Database connection pool sizing: a pool is a queue with a depth
Every request waits in line for a connection. Little's law says how long the line is, why a bigger pool makes it slower, and how exhaustion cascades.
PostgreSQLBackendPerformanceReliability - 003
Backpressure: when the consumer is slower than the producer
An unbounded buffer does not fix a speed mismatch, it postpones the crash. Bounded queues, blocking sends and early rejection, and where each one belongs.
BackendDistributed SystemsReliabilityPerformance - 004
Fixed window vs sliding window vs token bucket rate limiting
A 100 per minute counter will pass 200 requests in two seconds at the window boundary. What a sliding window and a token bucket cost, and which to ship.
Rate LimitingRedisAPI DesignBackend - 005
UUID primary keys and write amplification in PostgreSQL
A UUIDv4 primary key scatters every insert across the B-tree, turning one logical write into several physical ones. The mechanism, and when it matters.
PostgreSQLDatabasesUUIDPerformance - 006
Keyset pagination vs OFFSET in PostgreSQL
OFFSET reads and discards every row it skips, and silently duplicates records when data shifts. Keyset pagination fixes both, at a price worth knowing.
PostgreSQLDatabasesAPI DesignPagination