Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

thinc (3788)

  (email not shown publicly)
+ -

  Journal: Finding the postgresql tables that have been clustered on 2010.04.30 15:30

Journal by thinc on 2010.04.30 15:30
User Journal

At $work we have a job that runs every night that calls clusterdb [1] on our database. clusterdb reruns cluster [2] against any tables that have previously been clustered.

If you want to know which tables have previously had cluster run on them, the following query does the trick:

SELECT pg_class.relname, pg_index.indisclustered FROM pg_class JOIN pg_index ON pg_class.oid = pg_index.indrelid AND pg_index.indisclustered = 't';

Read More 0 comments