Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 490589FB3A8 for ; Tue, 30 Jan 2007 05:36:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 90544-10 for ; Tue, 30 Jan 2007 05:36:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail3.plesk.ru (gw-swsoft2.ll-nsk.zsttk.ru [82.200.65.190]) by postgresql.org (Postfix) with ESMTP id 207819FB381 for ; Tue, 30 Jan 2007 05:36:21 -0400 (AST) Received: by mail3.plesk.ru (Postfix, from userid 426) id 282581A9BE9; Tue, 30 Jan 2007 15:36:36 +0600 (NOVT) Received: from [127.0.0.1] (Lobanov.plesk.ru [192.168.62.80]) by mail3.plesk.ru (Postfix) with ESMTP id BBAB51A9BB9; Tue, 30 Jan 2007 15:36:35 +0600 (NOVT) Message-ID: <45BF118C.90205@swsoft.com> Date: Tue, 30 Jan 2007 15:36:12 +0600 From: Igor Lobanov User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Richard Huxton , pgsql-performance@postgresql.org Subject: Re: Querying distinct values from a large table References: <45BF02DE.7080605@swsoft.com> <45BF0C13.3070003@archonet.com> In-Reply-To: <45BF0C13.3070003@archonet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/416 X-Sequence-Number: 23017 Forgot to mention that our work_mem setting is 20480 Kb. > You might want to try > increasing work_mem for this one query to speed any sorting. -- Igor Lobanov Internal Development Engineer SWsoft, Inc.