Re: [PERFORM] multicolumn index column order

2007-07-30 Thread Lew
valgog wrote: On Jul 25, 2:14 am, Lew <[EMAIL PROTECTED]> wrote: How about two indexes, one on each column? Then the indexes will cooperate when combined in a WHERE clause. I don't believe the index makes a semantic dif

Re: [PERFORM] multicolumn index column order

2007-07-25 Thread valgog
On Jul 25, 2:14 am, Lew <[EMAIL PROTECTED]> wrote: > > How about two indexes, one on each column? Then the indexes will cooperate > when combined in a WHERE clause. > > > I don't believe the index makes a semantic differenc

Re: [PERFORM] multicolumn index column order

2007-07-24 Thread andrew
valgog <[EMAIL PROTECTED]> wrote .. > On Jul 23, 7:00 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > > valgog <[EMAIL PROTECTED]> writes: > > > how to build an multicolumn index with one column order ASCENDING and > > > another column order DESCENDING? > > > > Use 8.3 ;-) > > > > In existing releases yo

Re: [PERFORM] multicolumn index column order

2007-07-24 Thread Valentine Gogichashvili
On 7/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: valgog <[EMAIL PROTECTED]> wrote .. > On Jul 23, 7:00 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > > valgog <[EMAIL PROTECTED]> writes: > > > how to build an multicolumn index with one column order ASCENDING and > > > another column order DES

Re: [PERFORM] multicolumn index column order

2007-07-23 Thread valgog
On Jul 23, 7:00 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > valgog <[EMAIL PROTECTED]> writes: > > how to build an multicolumn index with one column order ASCENDING and > > another column order DESCENDING? > > Use 8.3 ;-) > > In existing releases you could fake it with a custom reverse-sorting > oper

Re: [PERFORM] multicolumn index column order

2007-07-23 Thread Tom Lane
valgog <[EMAIL PROTECTED]> writes: > how to build an multicolumn index with one column order ASCENDING and > another column order DESCENDING? Use 8.3 ;-) In existing releases you could fake it with a custom reverse-sorting operator class, but it's a pain in the neck to create one.

[PERFORM] multicolumn index column order

2007-07-23 Thread valgog
Hello all, how to build an multicolumn index with one column order ASCENDING and another column order DESCENDING? The use case that I have is that I use 2 column index where the first column is kind of flag and the second column is an actual ordering column. The flag should be always ordered DESC