Re: Updating a very large table

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

 



Ron Mayer <rm_pg@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> Would doing something with ctid be even better?
> Or does it have some risks I'm missing.   I'm thinking
> something like:

> update table set new_column=[whatever] where ctid<'(10000,1)';
> vacuum;
> update table set new_column=[whatever] where ctid>'(10000,1)' and ctid<'(20000,1');
> vacuum;
> ...
> update table set new_column=[whatever] where ctid>'(180000,1)';
> vacuum;

You are forgetting the fact that an UPDATE in itself changes a row's
ctid.

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux