Re: How to do faster DML
Greg Sabino Mullane <htamfids@gmail.com>
From: Greg Sabino Mullane <htamfids@gmail.com>
To: veem v <veema0000@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>,
Ron Johnson <ronljohnsonjr@gmail.com>, "Peter J. Holzer" <hjp-pgsql@hjp.at>,
Laurenz Albe <laurenz.albe@cybertec.at>, "pgsql-generallists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2024-02-15T20:19:00Z
Lists: pgsql-general
I really worry you are overthinking this. The only real concern is going from INT to BIGINT, jumping from 4 to 8 bytes or storage. That really covers 99% of real world cases, and the canonical advice is to start with BIGINT if you ever think your rows are going to be numbered in the billions. Also, a NUMERIC can cause a table rewrite - try changing the scale, not just the precision. And if your scale is 0, why are you using numeric? :) Cheers, Greg