pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
update on a large table
2+ messages / 1 participants
[nested] [flat]

* update on a large table
@ 2002-08-10 21:01 Aaron Held <aaron@metrony.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Aaron Held @ 2002-08-10 21:01 UTC (permalink / raw)
  To: pgsql-sql

I need to do an UPDATE on a large (100 million record) table.  Is there
any way to speed up the process (Like turning off the transaction log)?

So far postgres has been handling the large database exceptionally well
(large \copy imports and WHERE clauses w/ multiple params) but it is
killing me on UPDATES.  It takes about 4 hours to run an UPDATE (the WHERE
clause is against an INDEX) but about 50 sec for a similar SELECT.

Thank You,
-Aaron Held





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: update on a large table
@ 2002-08-13 18:45 Aaron Held <aaron@metrony.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Aaron Held @ 2002-08-13 18:45 UTC (permalink / raw)
  To: pgsql-sql; +Cc: Douglas Trainor <trainor@uic.edu>; Christoph Haller <ch@rodos.com>

Thanks Doug,

I was doing an UPATE on 100 million rows and I was updating an indexed column, it was also
the column that I was basing my seach on.

UPDATE "Calls" SET "GroupCode"='100 my street' WHERE "GroupCode"='' AND "Site"='000005'

GroupCode was Indexed.  I dropped the index and the query ran in under one hour.

Now I have been running Vaccum Analyze for three days......

Thanks,
-Aaron Held




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-08-13 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-10 21:01 update on a large table Aaron Held <aaron@metrony.com>
2002-08-13 18:45 Re: update on a large table Aaron Held <aaron@metrony.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox