Re: Better index stategy for many fields with few values
| От | Markus Schaber |
|---|---|
| Тема | Re: Better index stategy for many fields with few values |
| Дата | |
| Msg-id | 443E1B01.5060804@logix-tt.com обсуждение исходный текст |
| Ответ на | Re: Better index stategy for many fields with few values ("Jim C. Nasby" <jnasby@pervasive.com>) |
| Список | 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 по дате отправления: