Re: extremly bad select performance on huge table - Mailing list pgsql-performance

From Igor Neyman
Subject Re: extremly bad select performance on huge table
Date
Msg-id A76B25F2823E954C9E45E32FA49D70ECAB2FDE07@mail.corp.perceptron.com
Whole thread Raw
In response to Re: extremly bad select performance on huge table  (Björn Wittich <Bjoern_Wittich@gmx.de>)
List pgsql-performance

-----Original Message-----
From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Björn Wittich
Sent: Tuesday, October 21, 2014 1:35 PM
To: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] extremly bad select performance on huge table

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
>
>
>
>

Did you check the bloat in your myprimkey index?

Regards,
Igor Neyman



pgsql-performance by date:

Previous
From: Björn Wittich
Date:
Subject: Re: extremly bad select performance on huge table
Next
From: Tom Lane
Date:
Subject: Re: extremly bad select performance on huge table