Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id EFEE59FB1E1 for ; Wed, 25 Oct 2006 18:17:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 85918-02 for ; Wed, 25 Oct 2006 21:16:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 9AC0B9FA621 for ; Wed, 25 Oct 2006 18:16:19 -0300 (ADT) Received: from [192.168.1.95] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k9PLGC63015140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Oct 2006 14:16:13 -0700 Message-ID: <453FD447.1050206@commandprompt.com> Date: Wed, 25 Oct 2006 14:16:55 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: Richard Huxton CC: Mark Lonsdale , pgsql-performance@postgresql.org Subject: Re: Configuration Issue ? References: <673ECBB77DA91F47AD4902A5FD73BCE4BA3A94@mail3> <453FD351.7000408@archonet.com> In-Reply-To: <453FD351.7000408@archonet.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 25 Oct 2006 14:16:14 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/537 X-Sequence-Number: 21666 Richard Huxton wrote: > Mark Lonsdale wrote: >> >> Hi Josh >> >> Thanks for the feedback, that is most usefull. When you said one of the >> settings was likely killing us, was it all of the settings for >> max_fsm_relations, max_fsm_pages, and sort_mem or just the setting for >> sort_mem ? >> >> Can you explain why the setting would be killing me :-) > > The sort_mem is crucial. It's memory *per sort*, which means one query > can use several times that amount. Worse then that it is: ((sort memory) * (number of sorts)) * (number of connections) = amount of ram possible to use. Now... take the following query: SELECT * FROM foo JOIN bar on (bar.id = foo.id) JOIN baz on (baz.id = foo_baz.id) ORDER BY baz.name, foo.salary; Over 5 million rows... How much ram you think you just used? > >> The long and short is you need to upgrade to at least 7.4, preferrably >> 8.1. > > Joshua means this too. Upgrade to 7.3.16 within the next few days, then > test out something more recent. You should see some useful performance > gains from 8.1. Right. The reason I suggested 7.4 is that he gets VACUUM VERBOSE in a reasonable fashion but of course 8.1 is better. Sincerely, Joshua D. Drake > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate