Why is this taking so damn long?

Started by Paul Tomblinalmost 25 years ago3 messagesgeneral
Jump to latest
#1Paul Tomblin
ptomblin@xcski.com

I just added a boolean column to an existing database with 70,000 records.
I then tried to set all the existing columns to true using
update waypoint set ispublic = TRUE;
but it's taken over an hour so far.

Why?

--
Paul Tomblin <ptomblin@xcski.com>, not speaking for anybody
"I have traveled the length and breadth of this country and talked with the
best people, and I can assure you that data processing is a fad that won't
last out the year." --Editor of business books for Prentice Hall, 1957.

#2GH
grasshacker@over-yonder.net
In reply to: Paul Tomblin (#1)
Re: Why is this taking so damn long?

On Sat, Apr 28, 2001 at 02:18:42PM -0400, some SMTP stream spewed forth:

I just added a boolean column to an existing database with 70,000 records.
I then tried to set all the existing columns to true using
update waypoint set ispublic = TRUE;
but it's taken over an hour so far.

Hm, we need some damn information. :)
Is there an index on this column?
What version of PostgreSQL are you using?
(Not as relevant) Have you vacuum'ed this table lately?

Thanks...

gh

Show quoted text

Why?

--
Paul Tomblin <ptomblin@xcski.com>, not speaking for anybody
"I have traveled the length and breadth of this country and talked with the
best people, and I can assure you that data processing is a fad that won't
last out the year." --Editor of business books for Prentice Hall, 1957.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

#3Paul Tomblin
ptomblin@xcski.com
In reply to: GH (#2)
Re: Why is this taking so damn long?

Quoting GH (grasshacker@over-yonder.net):

On Sat, Apr 28, 2001 at 02:18:42PM -0400, some SMTP stream spewed forth:

I just added a boolean column to an existing database with 70,000 records.
I then tried to set all the existing columns to true using
update waypoint set ispublic = TRUE;
but it's taken over an hour so far.

Hm, we need some damn information. :)
Is there an index on this column?
What version of PostgreSQL are you using?
(Not as relevant) Have you vacuum'ed this table lately?

No, I just added the column, I didn't put an index on it. It's Postgres
6.5. And you're right, I haven't vacuumed it recently. And the update is
still running.

--
Paul Tomblin <ptomblin@xcski.com>, not speaking for anybody
A fool and his money are soon flying more airplane than he can
handle.