Search Postgresql Archives

Re: stored procs

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

 



On 09/30/11 2:09 AM, J.V. wrote:
Some tables have millions of rows,

well, something like UPDATE tablename SET id=generate_series(1,numberofrows); will update every row to a sequential value. However, I have no idea how you would match the foreign key references in other tables to these new sequence values.

anything that updates a field on a million rows will be causing every row to be updated... postgres never updates anything in place, it will be copying the whole row to a new one (this is how it implements MVCC, and its fundamental to the architecture, there's nothing you can do to override this behavior).



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


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


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux