X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7EDB152862 for ; Mon, 13 Jun 2005 11:32:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35063-04 for ; Mon, 13 Jun 2005 14:32:13 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 425F75280B for ; Mon, 13 Jun 2005 11:32:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j5DEWG2t019629; Mon, 13 Jun 2005 10:32:16 -0400 (EDT) To: Yves Vindevogel Cc: pgsql-performance@postgresql.org Subject: Re: Updates on large tables are extremely slow In-reply-to: <65760c67987848d35eafecdcccd8742c@implements.be> References: <579bc853ef3957c736c2773f13c444f7@implements.be> <42ACF2DD.8090409@paradise.net.nz> <42AD49BF.7050706@paradise.net.nz> <65760c67987848d35eafecdcccd8742c@implements.be> Comments: In-reply-to Yves Vindevogel message dated "Mon, 13 Jun 2005 11:02:04 +0200" Date: Mon, 13 Jun 2005 10:32:16 -0400 Message-ID: <19628.1118673136@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/289 X-Sequence-Number: 12926 Yves Vindevogel 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