cluster on conditional index?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx)
Twitter: @hunleyd                                               Web:
douglasjhunley.com
G+: http://goo.gl/sajR3


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux