Search Postgresql Archives

Re: How to do faster DML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/24 09:00, Greg Sabino Mullane wrote:
On Thu, Feb 15, 2024 at 11:43 AM Adrian Klaver <adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>> 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);

Alright now I see:

test=# create table int_test(c1 int, c2 int);
CREATE TABLE

test=# select pg_relation_filenode('int_test');
 pg_relation_filenode
----------------------
                70021
(1 row)


test=# insert into int_test select a, a+1 from generate_series(1, 10000, 1) as t(a);
INSERT 0 10000

test=# select pg_relation_size('int_test');
 pg_relation_size
------------------
           368640
(1 row)

test=# alter table int_test alter column c2 set data type bigint;
ALTER TABLE

test=# select pg_relation_filenode('int_test');
 pg_relation_filenode
----------------------
                70024
(1 row)

test=# select pg_relation_size('int_test');
 pg_relation_size
------------------
           450560
(1 row)


Cheers,
Greg


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux