From: | "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | Doug Hunley <doug(dot)hunley(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: cluster on conditional index? |
Date: | 2012-08-14 17:29:10 |
Message-ID: | 20120814172910.GP27500@aart.rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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(dot)hunley(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Doug Hunley | 2012-08-15 13:43:07 | Re: cluster on conditional index? |
Previous Message | Jeff Janes | 2012-08-14 17:10:47 | Re: cluster on conditional index? |