Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B3E69B5DBD0 for ; Tue, 28 Jun 2011 21:51:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 52305-07 for ; Wed, 29 Jun 2011 00:51:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mail.postgresql.org (Postfix) with ESMTP id 241DEB5D91F for ; Tue, 28 Jun 2011 21:51:52 -0300 (ADT) Received: from [192.168.1.7] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MSa8q-1R37FD3DPw-00RYf8; Wed, 29 Jun 2011 02:51:52 +0200 Message-ID: <4E0A7726.2040809@2ndQuadrant.com> Date: Tue, 28 Jun 2011 20:51:50 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110505 Icedove/3.0.11 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Slow performance when querying millions of rows References: <20110628232643.3a3e6337@mail.openroadsconsulting.com> In-Reply-To: <20110628232643.3a3e6337@mail.openroadsconsulting.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:55jifYnawwtbFQ03miPwz1wD0fx4WFYYyNVkQwBhueD ZaKc9hEEDuJ/CXkDgFYZOHFHRpt7mOy6UZsQJClgTHzYYT7QHs 0M9VM7B2vH4WrQhUhrqILf26fG93/2CZLJ/O7u3/qF+e5jj069 PxDaVa3ijLBnb66jyJnfJKuGYCoaTfOXT83r1ekPqnkEiUCxVJ DluUYdDtJrFxSTU1MRJhRHp5Da8R5lz+kf12L9DEL8= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.585 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 201106/266 X-Sequence-Number: 44199 On 06/28/2011 07:26 PM, Craig McIlwee wrote: > Yes, the data import is painfully slow but I hope to make up for that > with the read performance later. You can probably improve that with something like this: shared_buffers=512MB checkpoint_segments=64 Maybe bump up maintenance_work_mem too, if the vacuum part of that is the painful one. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD Comprehensive and Customized PostgreSQL Training Classes: http://www.2ndquadrant.us/postgresql-training/