Re: 57 minute SELECT - Mailing list pgsql-performance

From Claudio Freire
Subject Re: 57 minute SELECT
Date
Msg-id CAGTBQpYdss9oZykcB46zhBBgN+gVCX=8mj2=iciwFywtsHfNqg@mail.gmail.com
Whole thread Raw
In response to Re: 57 minute SELECT  (Samuel Stearns <sstearns@staff.iinet.net.au>)
Responses Re: 57 minute SELECT
List pgsql-performance
On Wed, Oct 2, 2013 at 10:47 PM, Samuel Stearns
<sstearns@staff.iinet.net.au> wrote:
> Thanks, Claudio:
>
> http://explain.depesz.com/s/WJQx

If you have a test database, and if it doesn't hurt other queries of
course, try clustering on the ip index.

I believe your problem is that the index isn't helping much, it's
probably hurting you in fact. If you cluster over ip, however, the
scan will go almost sequentially, and there will be no wasted bytes in
the pages fetched, which will be much friendlier on your I/O
subsystem.

If I were in your shoes, I'd cluster each of the monthly tables as
they become inactive.


pgsql-performance by date:

Previous
From: Samuel Stearns
Date:
Subject: Re: 57 minute SELECT
Next
From: Samuel Stearns
Date:
Subject: Re: 57 minute SELECT