Re: Q: Structured index - which one runs faster?

Поиск
Список
Период
Сортировка
От Ernest E Vogelsinger
Тема Re: Q: Structured index - which one runs faster?
Дата
Msg-id 5.1.1.6.2.20030523013910.03095bb8@mail.vogelsinger.at
обсуждение исходный текст
Ответ на Re: Q: Structured index - which one runs faster?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Q: Structured index - which one runs faster?
Список pgsql-admin
At 00:53 23.05.2003, Tom Lane said:
--------------------[snip]--------------------
>Ernest E Vogelsinger <ernest@vogelsinger.at> writes:
>> (a) creating an index on all three columns, or
>> (b) create a single varchar column combining all three components into a
>> single string, like "ident1:ident2:nodeid" and indexing this column only.
>
>I can't imagine that (b) is a good idea ... it's dubious that you are
>saving anything on the indexing, and you're sure adding a lot of space
>to the table, not to mention maintenance effort, potential for bugs,
>etc.
>
>It might be worth creating the index so that the "least non-unique"
>column is mentioned first, if there's a clear winner in those terms.
>That would minimize the number of times that comparisons have to look at
>the additional columns.
--------------------[snip]--------------------

Thanks for replying :)

Do you know if there's a general performance difference between numeric
(int4) and character (fixed-size char[5]) columns? The ident1 and ident2
columns are planned to be char[5], only the third column (with least
precedence) will be numeric.

The application is still in the design phase, so I still could fiddle
around that and make that char[5] numeric with an additional mapping
(@runtime, not in the DB) if this will increase performance.

Thanks,

--
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Q: Structured index - which one runs faster?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Q: Structured index - which one runs faster?