Re: Updates on large tables are extremely slow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Updates on large tables are extremely slow
Date: 2005-06-13 14:32:16
Message-ID: 19628.1118673136@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be> writes:
> rvponp=3D# vacuum verbose tblPrintjobs ;
> INFO: vacuuming "public.tblprintjobs"
> [ twenty-one different indexes on one table ]

Well, there's your problem. You think updating all those indexes is
free? It's *expensive*. Heed the manual's advice: avoid creating
indexes you are not certain you need for identifiable commonly-used
queries.

(The reason delete is fast is it doesn't have to touch the indexes ...
the necessary work is left to be done by VACUUM.)

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2005-06-13 14:34:33 Re: Index ot being used
Previous Message Kevin Grittner 2005-06-13 14:21:06 Re: Help with rewriting query