[GENERAL] CLUSTER on 2 indexes ?

2010-02-15 Thread Joao Ferreira gmail
Hello,

Considering the CLUSTER operation on a frequently updated table, if I
have 2 indexes on the table how do I choose one of them ? or is it
possible to have CLUSTER take both into consideration...

my table is read from based on two columns: a 'timestamp' integer column
(actually a UTC integer timestamp) and a text columun called 'var' that
separates raw data from each other... something like a 'product type' in
a wharehouse example.

All queries that read from the table specify a time range and also the
'product type'. I have indexes on both.

Evidently no CLUSTERing should be worse than clustering on any of them,
but is there a way to have the two or choose the most profitable ?

thanks
Joao



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


Re: [GENERAL] CLUSTER on 2 indexes ?

2010-02-15 Thread Scott Marlowe
On Mon, Feb 15, 2010 at 9:47 AM, Joao Ferreira gmail
joao.miguel.c.ferre...@gmail.com wrote:
 Hello,

 Considering the CLUSTER operation on a frequently updated table, if I
 have 2 indexes on the table how do I choose one of them ? or is it
 possible to have CLUSTER take both into consideration...

You could have a multi-column index

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