Re: [GENERAL] adding a column takes FOREVER!

2011-11-01 Thread Eric Smith
Tom, Well... there's a lot of data hiding in each of those rows... as much as 4MB in each. I'll make allowances in my code so that adding a column without a default is a workable solution. Thank you, Eric On Nov 1, 2011, at 8:27 PM, Tom Lane wrote: > Eric Smith writes: >> Thank you for the

Re: [GENERAL] adding a column takes FOREVER!

2011-11-01 Thread Tom Lane
Eric Smith writes: > Thank you for the response... to be perfectly honest, I don't know enough to > know what I'm not telling you. Below is the string I use to create the > table, so you can see the contents. I don't think I have foreign key > references or triggers of any kind. Any ideas? (

Re: [GENERAL] adding a column takes FOREVER!

2011-11-01 Thread Gauthier, Dave
general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Eric Smith Sent: Tuesday, November 01, 2011 10:05 PM To: Tom Lane Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] adding a column takes FOREVER! Thank you for the response... to be perfectly honest, I don't know

Re: [GENERAL] adding a column takes FOREVER!

2011-11-01 Thread Eric Smith
Thank you for the response... to be perfectly honest, I don't know enough to know what I'm not telling you. Below is the string I use to create the table, so you can see the contents. I don't think I have foreign key references or triggers of any kind. Any ideas? (this is 8.3 running on Mac O

Re: [GENERAL] adding a column takes FOREVER!

2011-10-22 Thread Thomas Kellerer
Tom Lane wrote on 22.10.2011 05:24: I'm thinking there is something you haven't told us about that creates a great deal of overhead for updates on this table. Lots and lots o' indexes? Lots and lots o' foreign key references? Why would an add column need to check foreign key references? --

Re: [GENERAL] adding a column takes FOREVER!

2011-10-21 Thread Tom Lane
Eric Smith writes: > I'm adding a column in postgres 8.3 with the syntax: alter table images add > column "saveState" varchar(1) default '0'; It takes a good solid 20 minutes > to add this column to a table with ~ 14,000 entries. Why so long? Is there > a way to speed that up? The table ha

Re: [GENERAL] adding a column takes FOREVER!

2011-10-21 Thread Craig Ringer
On 10/22/2011 06:45 AM, Eric Smith wrote: All, I'm adding a column in postgres 8.3 with the syntax: alter table images add column "saveState" varchar(1) default '0'; It takes a good solid 20 minutes to add this column to a table with ~ 14,000 entries. Why so long? Is there a way to speed t

[GENERAL] adding a column takes FOREVER!

2011-10-21 Thread Eric Smith
All, I'm adding a column in postgres 8.3 with the syntax: alter table images add column "saveState" varchar(1) default '0'; It takes a good solid 20 minutes to add this column to a table with ~ 14,000 entries. Why so long? Is there a way to speed that up? The table has ~ 50 columns. Thank

Re: [GENERAL] Adding a column with constraint

2011-02-24 Thread Alexander Farber
On Thu, Feb 24, 2011 at 8:02 PM, David Johnston wrote: > A column constraint can only reference its own column.  Since you are > referencing "completed" in the CHECK it implicitly converts the Column > constraint into a Table constraint - and table constraints do not reference > the name of a colu

Re: [GENERAL] Adding a column with constraint

2011-02-24 Thread David Johnston
generation. David J. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber Sent: Thursday, February 24, 2011 1:31 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Adding a column with constraint Hello,

Re: [GENERAL] Adding a column with constraint

2011-02-24 Thread Andrew Sullivan
On Thu, Feb 24, 2011 at 07:30:32PM +0100, Alexander Farber wrote: > Shouldn't the line > > "pref_match_check" CHECK (completed >= win AND win >= 0) > > above actually be: > > "pref_match_win_check" CHECK (completed >= win AND win >= 0) > > ? Does it indicate something went wrong or is i

[GENERAL] Adding a column with constraint

2011-02-24 Thread Alexander Farber
Hello, I have a paranoic question. In PostgreSQL 8.4.7 I had a table to store started, completed and interrupted games : # \d pref_match Table "public.pref_match" Column | Type |Modifiers ---+---+-

Re: [GENERAL] Adding a column

2006-10-29 Thread Tom Lane
Bob Pawley <[EMAIL PROTECTED]> writes: > Any thoughts on why dynamically adding a column to a table would require = > a run time of 24,000 + milliseconds?? Updating all the rows to store the default value, no doubt. See http://developer.postgresql.org/pgdocs/postgres/ddl-alter.html especially the

[GENERAL] Adding a column

2006-10-29 Thread Bob Pawley
Any thoughts on why dynamically adding a column to a table would require a run time of 24,000 + milliseconds??   Adding a serial column to three tables requires almost 100,000 ms.   Bob Pawley