From: ktm@rice.edu <ktm@rice.edu>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Doug Hunley <doug.hunley@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: cluster on conditional index?
Date: Tue, 14 Aug 2012 12:29:10 -0500
Message-ID: <20120814172910.GP27500@aart.rice.edu> (raw)
In-Reply-To: <CAMkU=1yB0C7pZzk9tM2mAUB8RWHxnpoVLn28ZQ_uSE__uTZAcg@mail.gmail.com>
References: <CALxYTP4vNQ+_rA7eHS+-wCYs7GaQdyaFoJb7g_UzvBt1ou2Eng@mail.gmail.com>
<CAMkU=1yB0C7pZzk9tM2mAUB8RWHxnpoVLn28ZQ_uSE__uTZAcg@mail.gmail.com>
On Tue, Aug 14, 2012 at 10:10:47AM -0700, Jeff Janes wrote:
> On Tue, Aug 14, 2012 at 8:27 AM, Doug Hunley <doug.hunley@gmail.com> wrote:
> > According to the docs on cluster:
> > if you tend to access some data more than others, and there is an
> > index that groups them together, you will benefit from using CLUSTER
> >
> > however, this doesn't address the situation where you have a
> > conditional index.
>
> It seems like it is not allowed.
>
> jjanes=# create index on pgbench_accounts (aid) where bid=33;
> jjanes=# cluster pgbench_accounts USING pgbench_accounts_aid_idx ;
> ERROR: cannot cluster on partial index "pgbench_accounts_aid_idx"
>
> But I don't see a fundamental reason it can't be allowed, maybe
> implementing that should be on the to-do list.
>
> Cheers,
>
> Jeff
>
It probably has to do with the fact that a conditional index, does
not include every possible row in the table. Although, a "cluster" of
the matching rows and then leave the rest in place, should work. How
is that for hand-waving. :)
Regards,
Ken
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: ktm@rice.edu, jeff.janes@gmail.com, doug.hunley@gmail.com
Subject: Re: cluster on conditional index?
In-Reply-To: <20120814172910.GP27500@aart.rice.edu>
* 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