Skip site navigation (1) Skip section navigation (2)

questions about CLUSTER

From: Douglas J Hunley <doug(at)hunley(dot)homeip(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: questions about CLUSTER
Date: 2008-02-27 16:01:57
Message-ID: 200802271101.57169.doug@hunley.homeip.net (view raw or flat)
Thread:
Lists: pgsql-performance
After reviewing http://www.postgresql.org/docs/8.3/static/sql-cluster.html a 
couple of times, I have some questions:
1) it says to run analyze after doing a cluster. i'm assuming autovacuum will 
take care of this? or should i go ahead and do the analyze 'now' instead of 
waiting?
2) is there any internal data in the db that would allow me to 
programmatically determine which tables would benefit from being clustered?
3) for that matter, is there info to allow me to determine which index it 
should be clustered on in cases where the table has more than one index?
4) for tables with >1 indexes, does clustering on one index negatively impact 
queries that use the other indexes?
5) is it better to cluster on a compound index (index on lastnamefirstname) or 
on the underlying index (index on lastname)?

tia
-- 
Douglas J Hunley (doug at hunley.homeip.net) - Linux User #174778
http://doug.hunley.homeip.net

Everything takes twice as long as you plan for and produces results about half 
as good as you hoped.

Responses

pgsql-performance by date

Next:From: Frits HooglandDate: 2008-02-27 17:36:52
Subject: Re: how to identify expensive steps in an explain analyze output
Previous:From: Tom LaneDate: 2008-02-27 15:26:07
Subject: Re: how to identify expensive steps in an explain analyze output

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group