cluster on conditional index? - Mailing list pgsql-performance

From Doug Hunley
Subject cluster on conditional index?
Date
Msg-id CALxYTP4vNQ+_rA7eHS+-wCYs7GaQdyaFoJb7g_UzvBt1ou2Eng@mail.gmail.com
Whole thread Raw
Responses Re: cluster on conditional index?  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
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. For example, we have certain large tables that have
a column called 'is_deleted'. It's a boolean, to indicate whether the
record is 'deleted' as far as the app is concerned. Since the app only
ever shows data where is_deleted is false, I created an index:
create index foo on bar where is_deleted is false;
and now I'm wondering if clustering on this index will bring the
benefits noted above or if I should rebuild my index w/o the where
clause to obtain the best 'improvement' from cluster.

Anyone know?

--
Douglas J Hunley (doug.hunley@gmail.com)
Twitter: @hunleyd                                               Web:
douglasjhunley.com
G+: http://goo.gl/sajR3


pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Index Bloat Problem
Next
From: Jeff Janes
Date:
Subject: Re: cluster on conditional index?