you are right, I must have missed it... Table "public.u" Column | Type | Modifiers --------+-----------------------------+----------- id | integer | t | timestamp without time zone | d | text | Indexes: "u_d" btree (d) "u_id" btree (id) "u_t" btree (t)
fi...@filip=# select oid, relname, pg_Relation_size(oid) from pg_class where relname in('u','u_id','u_t','u_d'); oid | relname | pg_relation_size -------+---------+------------------ 64283 | u | 15187968 64289 | u_id | 6758400 64290 | u_t | 6086656 64291 | u_d | 16482304 fi...@filip=# CLUSTER u USING u_t; CLUSTER fi...@filip=# select oid, relname, pg_Relation_size(oid) from pg_class where relname in('u','u_id','u_t','u_d'); oid | relname | pg_relation_size -------+---------+------------------ 64283 | u | 12115968 64289 | u_id | 3391488 64290 | u_t | 3391488 64291 | u_d | 8216576 (4 rows) So CLUSTER is effectively CLUSTER + REINDEX... nice. W dniu 17 grudnia 2010 10:41 użytkownik Marti Raudsepp <ma...@juffo.org>napisał: > 2010/12/17 Filip Rembiałkowski <filip.rembialkow...@gmail.com>: > > regarding clustering: it does not help with index bloat. > > I'm almost sure it does, CLUSTER re-creates all indexes from scratch > after copying the tuples. > > Regards, > Marti >