Re: Better index stategy for many fields with few values - Mailing list pgsql-performance

From Markus Schaber
Subject Re: Better index stategy for many fields with few values
Date
Msg-id 443E1B01.5060804@logix-tt.com
Whole thread Raw
In response to Re: Better index stategy for many fields with few values  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-performance
Hi, Jim,

Jim C. Nasby wrote:

>>>I was also thinking about about using a functional index.
>>If there's a logical relation between those values that they can easily
>>combined, that may be a good alternative.
> How would that be any better than just doing a multi-column index?

10 different values per column, and 20 columns are 10^20 value combinations.

Partitioning it for the first column gives 10^19 combinations which is
smaller than 2^64, and thus fits into a long value.

And I just guess that a 10-partition functional index on a long value
could perform better than a multi-column index on 20 columns of
character(10), if only because it is approx. 1/25th in size.

HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

pgsql-performance by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: bad performance on Solaris 10
Next
From: Markus Schaber
Date:
Subject: Re: Better index stategy for many fields with few values