Re: Indexes? - Mailing list pgsql-general

From Bjørn T Johansen
Subject Re: Indexes?
Date
Msg-id 41B00489.1070401@havleik.no
Whole thread Raw
In response to Re: Indexes?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Well, then it's decided to try with two indexes...

Thx... :)


BTJ

Bruno Wolff III wrote:
> On Wed, Dec 01, 2004 at 23:16:48 -0800,
>   Vincent Hikida <vhikida@inreach.com> wrote:
>
>>I believe that it is better to have a concatenated key of
>>(toDate,FromDate). The reason the toDate should come first is that for more
>>"recent" records, finding curDates less than toDate is much more selective
>>than finding curDates greater than fromDate. Actually I'm not sure if
>>fromDate is that helpful either as part of the concatenated key (it
>>probably depends) but definitely not by itself.
>
>
> I combined index won't be very useful for the kind of search he is doing.
> And not having an index on FromDate could hurt in some cases depending
> on the distribution of values.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: reclaiming diskspace bloat w/near-zero downtime
Next
From: "Jim C. Nasby"
Date:
Subject: pgFoundary?