PsqlTetris - A Small Mix Formatter Plugin for Tidier Postgres Columns - Announcing - Elixir Programming Language Forum
You’ve probably seen this: someone writes a perfectly sensible create table with columns in whatever order popped into their head. A boolean here, a string there, a bigint at the end. It works, but those mixed types can cause alignment padding that wastes bytes per row. That’s harmless for small tables, but at tens or hundreds of millions of rows those wasted bytes become extra pages on disk and more cache misses. Many years ago, back when I was mining for Gems 😉 I found this gem: pg_colum...