extremly bad select performance on huge table

From: Björn Wittich <Bjoern_Wittich(at)gmx(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Subject: extremly bad select performance on huge table
Date: 2014-10-21 17:26:03
Message-ID: 5446972B.9040409@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Björn Wittich 2014-10-21 17:35:03 Re: extremly bad select performance on huge table
Previous Message Tom Lane 2014-10-21 16:50:32 Re: Query with large number of joins