Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D1FFF37BECD for ; Fri, 3 Oct 2008 04:25:49 -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 01008-09 for ; Fri, 3 Oct 2008 04:25:45 -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.184]) by postgresql.org (Postfix) with ESMTP id 2734637BE27 for ; Fri, 3 Oct 2008 04:25:44 -0300 (ADT) Received: by mu-out-0910.google.com with SMTP id i2so1211841mue.3 for ; Fri, 03 Oct 2008 00:25:42 -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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=+VIHQFFp/LbX78ecI63sjDFlp08MeKPi+qBFCvOYRvQ=; b=Q+fNLf0Nsbks5ykmqbS9ew4+Jq36nsAbmm7RAcMVFvlkuS2RujwDvVjAtngtu6Fmj/ qd/XkBngXRQUWN6LUN8CyAYXVgwM8jT26Fa2HfcuuKNvwDQuV5jhPvacmpdGsXFQSUiA aG8PMtXogdSyZ3VFLTESRALHe6+VPWOxQL24c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=ocEUPTKVlXV6K41vaEUGgG1yNSLFLyufu2eHvytSO2xoQNvVEa8O118Uo+S9DPPN+X qIM3EeI6m1wo7c3VA8kNvL2wHXmpgU7n5z5Xz8NIWKeC5a1MsrOeLxBQCSgFkkykd2wm OOp3uFNCJAaOAv48I4ixDNrPW0qbUUCqKfx5g= Received: by 10.103.2.14 with SMTP id e14mr399151mui.104.1223018742902; Fri, 03 Oct 2008 00:25:42 -0700 (PDT) Received: by 10.103.213.6 with HTTP; Fri, 3 Oct 2008 00:25:42 -0700 (PDT) Message-ID: Date: Fri, 3 Oct 2008 08:25:42 +0100 From: "Peter Childs" To: "Postgresql Performance" Subject: Slow Inserts on large tables MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 200810/20 X-Sequence-Number: 31601 I have a problem where by an insert on a "large" table will sometimes take longer than usual. Usually the inserts are quick then from time to time they will take a long time sometimes as much as 10seconds or longer. (But usually under 500ms which is when I start logging them) The queries are slow drip fed so bulk loading really is not an option, Its logging data. Used in analysis and for historical purposes mostly. I think the problem might have something to do with checkpoints, I'm relatively sure its not when the table expands as I've run a vacuum verbose straight away after a longer insert and not found loads of space in the fsm. I'm using 8.3.1 (I thought I'd upgraded to 8.3.3 but it does not look like the upgrade worked) I'm more than happy to upgrade just have to find the down time (even a few seconds can be difficult) Any help would be appreciated. Regards Peter Childs