X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EAFCA9FB29D for ; Thu, 24 Aug 2006 09:08:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 63019-02 for ; Thu, 24 Aug 2006 09:08:41 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by postgresql.org (Postfix) with ESMTP id DA01A9FB215 for ; Thu, 24 Aug 2006 09:08:41 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id i31so126880wra for ; Thu, 24 Aug 2006 05:08:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WE5Ycsz+0R5LQ0w7Ryb5ZWP2+FNInaUu7JVt1iAFMftAdkKI5MXxU9VH1Dl9r/W2jruHTol1vd1Qa6MdYNEUAulYwblyGjhQLWdkD9mgbb2Lko8Ag8n+SoV4aVSQmV/RLtgMdKyi/gd9Q8CeoIw6/6cFJ1ofvAb2ZT1KFM36z6I= Received: by 10.90.78.16 with SMTP id a16mr360705agb; Thu, 24 Aug 2006 05:08:40 -0700 (PDT) Received: by 10.90.67.9 with HTTP; Thu, 24 Aug 2006 05:08:40 -0700 (PDT) Message-ID: <1dc7f0e30608240508t49a208acnbe26769e1b6f669d@mail.gmail.com> Date: Thu, 24 Aug 2006 08:08:40 -0400 From: "Alexandre Leclerc" To: "Thor Tall" Subject: Re: Slow delete/insert. Cc: pgsql-admin@postgresql.org In-Reply-To: <20060824082431.76181.qmail@web50313.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1dc7f0e30608231105h1da7c892n43dd53c27bf1a4fe@mail.gmail.com> <20060824082431.76181.qmail@web50313.mail.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/262 X-Sequence-Number: 22805 All this is prety straight forward. As for the transaction you are crating, is the process of 'split message' actually do on the DB side or are you doing this process on you side? Maybe this is the actual work of splitting the message by the DB that is very slow. /Maybe/ if you do this data-processing on your side, then sending that to the DB will save you time. If you really want that job being done on the server side, you could build yourself an extension module adding a special function that you would call to do the job. Maybe you could win couple cycles... But all that could be confirmed or not by someone else which knows more about PG internals. Best regards. -- Alexandre Leclerc