On 2/15/24 09:00, Greg Sabino Mullane wrote: > On Thu, Feb 15, 2024 at 11:43 AM Adrian Klaver > <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote: > > That is a mixed bag: > > > Ha! Good point. Our contrived example table does suffer from that, so > perhaps the test should be: > > create table int_test(c1 int, c2 int);
Did a similar test as below using DB fiddle. Same results for fixed length data type i.e the size is getting increased. However for variable length types (like numeric) , it remains the same, so it must be just metadata change and thus should be quick enough even for a big table.
So one learning for me, i.e. one of the downside of fixed length data type is, with fixed length data types any future changes to it , will be a full table rewrite. And thus this sort of change for big tables will be a nightmare.