Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 75C6B6329DA for ; Tue, 20 Apr 2010 15:46:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 73406-01 for ; Tue, 20 Apr 2010 18:46:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vexbert.mr-paradox.net (vexbert.mr-paradox.net [198.145.180.174]) by mail.postgresql.org (Postfix) with ESMTP id BFC2162E522 for ; Tue, 20 Apr 2010 15:46:15 -0300 (ADT) Received: by vexbert.mr-paradox.net (Postfix, from userid 18391) id BEC27845CF; Tue, 20 Apr 2010 14:46:14 -0400 (EDT) Date: Tue, 20 Apr 2010 11:46:14 -0700 From: David Kerr To: Kevin Grittner Cc: Robert Haas , pgsql-performance@postgresql.org Subject: Re: Very high effective_cache_size == worse performance? Message-ID: <20100420184614.GD53489@mr-paradox.net> References: <20100420173936.GA50886@mr-paradox.net> <20100420180351.GA51940@mr-paradox.net> <4BCDA94E0200002500030BF8@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BCDA94E0200002500030BF8@gw.wicourts.gov> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.077 tagged_above=-10 required=5 tests=AWL=-0.167, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/256 X-Sequence-Number: 38506 On Tue, Apr 20, 2010 at 01:17:02PM -0500, Kevin Grittner wrote: - David Kerr wrote: - - > Incidentally the code is written to work like this : - > - > while (read X lines in file){ - > Process those lines. - > write lines to DB. - > } - - Unless you're selecting from multiple database tables in one query, - effective_cache_size shouldn't make any difference. There's - probably some other reason for the difference. - - A couple wild shots in the dark: - - Any chance the source files were cached the second time, but not the - first? - - Do you have a large checkpoint_segments setting, and did the second - run without a new initdb? - - -Kevin no i don't think the files would be cached the 2nd time. I ran it multiple times and got the same performance each time. It wasn't until i changed the parameter that performance got better. I've got checkpoint_segments = 300 Dave