From: Markus Schaber <schabi@logix-tt.com>
To: pgsql-performance@postgresql.org
Subject: Re: Better index stategy for many fields with few values
Date: Thu, 13 Apr 2006 11:33:53 +0200
Message-ID: <443E1B01.5060804@logix-tt.com> (raw)
In-Reply-To: <20060412204421.GK49405@pervasive.com>
References: <20060410165857.91471.qmail@web54705.mail.yahoo.com>
<443CF9B4.2080009@logix-tt.com>
<20060412204421.GK49405@pervasive.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: schabi@logix-tt.com
Subject: Re: Better index stategy for many fields with few values
In-Reply-To: <443E1B01.5060804@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox