Re: 1-/2-dimensional indexes for common columns, rationale?

Поиск
Список
Период
Сортировка
От Matthew
Тема Re: 1-/2-dimensional indexes for common columns, rationale?
Дата
Msg-id Pine.LNX.4.64.0803261510290.20402@aragorn.flymine.org
обсуждение исходный текст
Ответ на Re: 1-/2-dimensional indexes for common columns, rationale?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: 1-/2-dimensional indexes for common columns, rationale?
Список pgsql-performance
On Wed, 26 Mar 2008, A. Kretschmer wrote:
>> create index foo1 on bla (a);
>> create index foo2 on bla (b);
>> create index foo3 on bla (a,b);
>
> Which version do you have? Since 8.1 pg can use a so called 'bitmap
> index scan', because of this feature i guess you don't need the index
> foo3. (if you have 8.1 or higher)

Depending on your query, the bitmap index scan could be a good deal slower
than index foo3.

All of this depends on what queries you are going to be running, and how
much you value insert performance compared to select performance. I know
that foo3 can do everything that foo1 can, so foo1 could be viewed as
redundant. I'd be interested in hearing from the Powers That Be whether
foo2 is redundant too. It wasn't a while back.

My impression is that foo3 isn't much more expensive to alter than foo1 -
is that correct?

Matthew

--
Lord grant me patience, and I want it NOW!

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: 1-/2-dimensional indexes for common columns, rationale?
Следующее
От: Marinos Yannikos
Дата:
Сообщение: Re: 1-/2-dimensional indexes for common columns, rationale?