Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A707464FC93 for ; Thu, 27 Nov 2008 06:09:36 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19131-02 for ; Thu, 27 Nov 2008 06:09:34 -0400 (AST) X-Greylist: delayed 19:53:57.383607 by SQLgrey-1.7.6 Received: from mx.inode.at (mx02.lb01.inode.at [62.99.145.2]) by mail.postgresql.org (Postfix) with ESMTP id 4C97964FC8B for ; Thu, 27 Nov 2008 06:09:34 -0400 (AST) Received: from [85.124.56.44] (port=7796 helo=[10.192.17.33]) by smartmx-02.inode.at with esmtp (Exim 4.50) id 1L5doR-0005nm-JO; Thu, 27 Nov 2008 11:09:31 +0100 Message-ID: <492E71D8.4060303@sime.com> Date: Thu, 27 Nov 2008 11:09:28 +0100 From: Mario Weilguni User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Kevin Kempter CC: pgsql-performance Subject: Re: performance tuning queries References: <200811262121.05463.kevin@kevinkempterllc.com> In-Reply-To: <200811262121.05463.kevin@kevinkempterllc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 200811/283 X-Sequence-Number: 32014 Kevin Kempter schrieb: > Hi All; > > I'm looking for tips / ideas per performance tuning some specific queries. > These are generally large tables on a highly active OLTP system > (100,000 - 200,000 plus queries per day) > > First off, any thoughts per tuning inserts into large tables. I have a large > table with an insert like this: > > insert into public.bigtab1 (text_col1, text_col2, id) values ... > > QUERY PLAN > ------------------------------------------ > Result (cost=0.00..0.01 rows=1 width=0) > (1 row) > > The query cost is low but this is one of the slowest statements per pgfouine > Do you insert multiple values in one transaction, or one transaction per insert?