Re: 57 minute SELECT

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Samuel Stearns <sstearns(at)staff(dot)iinet(dot)net(dot)au>
Cc: David Johnston <polobo(at)yahoo(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: 57 minute SELECT
Date: 2013-10-03 04:13:58
Message-ID: CAGTBQpYdss9oZykcB46zhBBgN+gVCX=8mj2=iciwFywtsHfNqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Oct 2, 2013 at 10:47 PM, Samuel Stearns
<sstearns(at)staff(dot)iinet(dot)net(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Samuel Stearns 2013-10-03 04:19:29 Re: 57 minute SELECT
Previous Message Samuel Stearns 2013-10-03 02:04:33 Re: 57 minute SELECT