[GENERAL] Long running update

2005-10-16 Thread Andrew Janian
I needed to expand the size of one of the varchar columns in a table of my 135GB database. To do this, I used the following command: ALTER TABLE mb_fix_message RENAME COLUMN mb_symbol TO mb_symbol_old; ALTER TABLE mb_fix_message ADD COLUMN mb_symbol VARCHAR(25); UPDATE mb_fix_message

Re: [GENERAL] Long running update

2005-10-16 Thread Tom Lane
Andrew Janian [EMAIL PROTECTED] writes: I needed to expand the size of one of the varchar columns in a table of my 135GB database. How big is the particular table you are doing this on? What foreign key relationships is it involved in? (I wonder if the time is going into FK checking more than

Re: [GENERAL] Long running update

2005-10-16 Thread Andrew Janian
: [GENERAL] Long running update Andrew Janian [EMAIL PROTECTED] writes: I needed to expand the size of one of the varchar columns in a table of my 135GB database. How big is the particular table you are doing this on? What foreign key relationships is it involved in? (I wonder if the time

Re: [GENERAL] Long running update

2005-10-16 Thread Tom Lane
Andrew Janian [EMAIL PROTECTED] writes: If I cancel the update then I can drop the new column, rename the old column, do a vacuum, and then I should be left with what I started with, right? Right. How can I expand that column without using this query? Basically you want to alter the

Re: [GENERAL] Long running update

2005-08-12 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Would it? My first thought on reading the OP was to recommend contrib/pgstattuple, but I refrained after thinking that if the table is all that big, the last thing you need is someone doing a seqscan of the whole table to see where you are. Much less

[GENERAL] Long running update

2005-08-11 Thread Akash Garg
Hello, I currently running an update statement that updates every row in a very large table. This query will obviously take a long time to run. My question -- is there any way to know how much time it will take once it starts? Even something that could help me approximate the speed at which it's

Re: [GENERAL] Long running update

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 16:17:09 -0700: Hello, I currently running an update statement that updates every row in a very large table. This query will obviously take a long time to run. My question -- is there any way to know how much time it will take once it starts? Even something

Re: [GENERAL] Long running update

2005-08-11 Thread Tom Lane
Akash Garg [EMAIL PROTECTED] writes: I currently running an update statement that updates every row in a very large table. This query will obviously take a long time to run. My question -- is there any way to know how much time it will take once it starts? Even something that could help me

Re: [GENERAL] Long running update

2005-08-11 Thread Greg Stark
Roman Neuhauser [EMAIL PROTECTED] writes: Yeah, it would be nice if select, insert, update, delete could be set to log their progress at configured intervals. One feature that would be handy for doing this would be if Postgres supported READ DIRTY. Few databases support it, and

Re: [GENERAL] Long running update

2005-08-11 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: One feature that would be handy for doing this would be if Postgres supported READ DIRTY. Few databases support it, and Postgres currently doesn't, but it would be extremely handy for peeking to see how much progress an update, delete, or insert has made.