Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7519F650295 for ; Mon, 11 Aug 2008 16:04:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 41863-01-3 for ; Mon, 11 Aug 2008 16:03:49 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by postgresql.org (Postfix) with ESMTP id 8342765020C for ; Mon, 11 Aug 2008 16:03:11 -0300 (ADT) Received: by mu-out-0910.google.com with SMTP id i2so2063444mue.3 for ; Mon, 11 Aug 2008 12:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ip9SxUP0E65ChyVv6elQ4Kq580feG18IFQyekzqv1eM=; b=h/uVtds0oWq83ikBKJeCznrPwnVS1DJx8tPlrUGZocSae8EzzG9NDwOxLeCO9vRh4n /qUzx1GpCCSlE5AnCr6zSTm7J+OKs5mUYLVojbwZ0Z3WMGVJVdvIUcEgELPVICEhiA// +47pRjMZu6qi8I7NHC5hFjanT2964okW0zEqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=NSbWlDvtmLUYIX5fHraX9V5OedUsHPc8cg7o2ztgD9KpXJXeTiRhZcsKH2ZfyhOGZz uLJyVzW75n+6Aq9L9xbMxHgUCRI7tIA0p8G7Py8o7YC/6IK17p96FvY/iYOCTO2DwD6R z8yQ9GTyrzpnCf70th9XBh1672lPmGUXU5awA= Received: by 10.103.20.7 with SMTP id x7mr2985901mui.96.1218481390270; Mon, 11 Aug 2008 12:03:10 -0700 (PDT) Received: by 10.102.247.18 with HTTP; Mon, 11 Aug 2008 12:03:10 -0700 (PDT) Message-ID: Date: Mon, 11 Aug 2008 15:03:10 -0400 From: "Merlin Moncure" To: "Sabin Coanda" Subject: Re: long transaction Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <120621.32315.qm@web59503.mail.ac4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/113 X-Sequence-Number: 30994 On Mon, Aug 11, 2008 at 2:53 AM, Sabin Coanda wrote: > No, I cannot use VACUUM inside the transaction, and it seems this is the > problem, although autovacuum is set. > > However I checked the following scenario to find a solution. I call the > 30000 statements without transaction. The performance it not changed. But > when I add VACUUM command after each 20 statement set, I got the linear > performance that I want. Unfortunatelly this is not possible inside a > transaction. > > Do you know how could I solve my problem, keeping the 30000 statements > inside a single transaction ? long running transactions can be evil. is there a reason why this has to run in a single transaction? merlin