Comment by itsthecourier
2 hours ago
* BRIN indexes are great for append only with an incremental value (a 50MB instead of 100GB index in timeseries data in my case)
* If your disks are ssd and scsi in different volumes, adapt the random cost of io in the config to let the planner now
* if you have RAID controller and a Battery-Backed Write Cache (BBWC), you can disable Linux filesystem write barriers. removing excessive fsync from the mouth of the psql demigod in SoCaL ~linux 2015, Bruce Momjian IIRC
* monitor disk usage, in backups pipe to gz, never to disk
* counter-intuitevely modern hardware may have an io bottleneck and plenty of cpu, so try Filesystems like ZFS using Zstandard (zstd), for boost in your Transactions per second
* if possible, schema multitenancy instead of database multitenancy, instagram talked about this decades ago
* indexes index functions results too, precompute those fields and partial indexes help a lot
* BM25 and FTS in pg are so good you probably don't need Elasticsearch and you will save a lot in de-sync between both of them
* you may be hacked in this brave new world post Mythos, thus, learn PITR to an external only write, no override medium like S3
No comments yet
Contribute on Hacker News ↗