Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XgdL1-0003yf-7q for pgsql-performance@arkaria.postgresql.org; Tue, 21 Oct 2014 17:35:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XgdL0-0003Yo-Oh for pgsql-performance@arkaria.postgresql.org; Tue, 21 Oct 2014 17:35:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XgdKz-0003Y8-RW for pgsql-performance@postgresql.org; Tue, 21 Oct 2014 17:35:13 +0000 Received: from mout.gmx.net ([212.227.17.20]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XgdKw-00052P-KW for pgsql-performance@postgresql.org; Tue, 21 Oct 2014 17:35:12 +0000 Received: from [192.168.1.27] ([84.58.60.26]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MHXd2-1XhjGK2Bzg-003KNp for ; Tue, 21 Oct 2014 19:35:08 +0200 Message-ID: <54469947.1080006@gmx.de> Date: Tue, 21 Oct 2014 19:35:03 +0200 From: =?ISO-8859-15?Q?Bj=F6rn_Wittich?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: extremly bad select performance on huge table References: <5446972B.9040409@gmx.de> In-Reply-To: <5446972B.9040409@gmx.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:bmImlXw5+1bjWGYysVXBqcU0QIRIIkT+EiwK5JvWT+G0J/cE1Fb 5xPfx5rh6tf+1of6XTMR6egGCMuH5EsG2vAFY0UWG6wVFojywPJbbacxYkKnXhPg3CWNHE8 cUGZsnFnX6pMRNX3JtD+ArSG/0lv7co6/YfsUvHlpuqRPCDCGaLvQVUMuIYY8/yrlYl7dNA T+pJaYDlpNBl4JtJdjrcQ== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Sorry forget to copy the buffer information: " Heap Fetches: 356861" " Buffers: shared hit=71799472 read=613813" > Hi newsgroup, > > I have a very huge table (70 mio rows ) with a key (text length about > 30 characters each key). A select on this indexed column "myprimkey" > (index on column mycolumn) took more than 30 mins. > > Here is the explain (analyze,buffers) select mycolumn from myhugetable > > "Index Only Scan using myprimkey on myhugetable (cost=0.00..8224444.82 > rows=71768080 width=33) (actual time=16.722..2456300.778 rows=71825999 > loops=1)" > > " Heap Fetches: 356861" > > "Total runtime: 2503009.611 ms" > > > Even repeating the query does not show a performance improvement. I > assume that the index itself is too large for my db cache. What can I > do to gain performance? Which parameters can I adapt? Having a huge > Linux machine with 72 GB RAM. > > Note: This select is just for testing. My final statement will be a > join on this table via the "mycolumn" column. > > Thanks for your help > Björn > > > > -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance