pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Björn Wittich <Bjoern_Wittich@gmx.de>
To: pgsql-performance@postgresql.org
Subject: extremly bad select performance on huge table
Date: Tue, 21 Oct 2014 19:26:03 +0200
Message-ID: <5446972B.9040409@gmx.de> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

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



view thread (11+ messages)  latest in thread

Message-ID: <5446972B.9040409@gmx.de>
Permalink:  ../5446972B.9040409@gmx.de/
Also on:    postgresql.org/message-id/5446972B.9040409@gmx.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Bjoern_Wittich@gmx.de
  Subject: Re: extremly bad select performance on huge table
  In-Reply-To: <5446972B.9040409@gmx.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox