Re: [GENERAL] tune postgres for UPDATE

2008-12-09 Thread Albe Laurenz
Scott Marlowe wrote: Sebastian Böhm wrote: I have a table with a lot of columns (text and integer). It currently has 3Mio Rows. Updating a column in all rows (integer) takes endless (days). I'm afraid you may not understand how postgresql's MVCC implementation works here. Updating

Re: [GENERAL] tune postgres for UPDATE

2008-12-09 Thread Scott Marlowe
On Tue, Dec 9, 2008 at 3:17 AM, Albe Laurenz [EMAIL PROTECTED] wrote: Scott Marlowe wrote: Sebastian Böhm wrote: I have a table with a lot of columns (text and integer). It currently has 3Mio Rows. Updating a column in all rows (integer) takes endless (days). I'm afraid you may not

Re: [GENERAL] tune postgres for UPDATE

2008-12-09 Thread Pavan Deolasee
On Tue, Dec 9, 2008 at 9:13 PM, Scott Marlowe [EMAIL PROTECTED]wrote: I'm pretty sure you'd have to vacuum still in between runs or the extra fill factor space would only get used the first time. I.e.: create table fill factor 50% load data into table update whole table -- 50% free space

[GENERAL] tune postgres for UPDATE

2008-12-08 Thread Sebastian Böhm
Hi, I have a table with a lot of columns (text and integer). It currently has 3Mio Rows. Updating a column in all rows (integer) takes endless (days). The column I update is not indexed. How can I tune postgres to do this much more quickly? VMstat looks like this: r b swpd free buff

Re: [GENERAL] tune postgres for UPDATE

2008-12-08 Thread Grzegorz Jaśkiewicz
try rewriting it to something like: update users set price = p.price from prices p where p.type = 'normal_price' and p.currency = users.currency; -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] tune postgres for UPDATE

2008-12-08 Thread Filip Rembiałkowski
2008/12/8 Grzegorz Jaśkiewicz [EMAIL PROTECTED] try rewriting it to something like: update users set price = p.price from prices p where p.type = 'normal_price' and p.currency = users.currency; also avoid fake updates: update users set price = p.price from prices p where p.type =

Re: [GENERAL] tune postgres for UPDATE

2008-12-08 Thread Scott Marlowe
On Mon, Dec 8, 2008 at 3:28 AM, Sebastian Böhm [EMAIL PROTECTED] wrote: Hi, I have a table with a lot of columns (text and integer). It currently has 3Mio Rows. Updating a column in all rows (integer) takes endless (days). I'm afraid you may not understand how postgresql's MVCC