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")
Ответы: Re: 1-/2-dimensional indexes for common columns, rationale?  (PFC)
Список: pgsql-performance

Скрыть дерево обсуждения

1-/2-dimensional indexes for common columns, rationale?  (Marinos Yannikos, )
 Re: 1-/2-dimensional indexes for common columns, rationale?  ("A. Kretschmer", )
  Re: 1-/2-dimensional indexes for common columns, rationale?  (Matthew, )
   Re: 1-/2-dimensional indexes for common columns, rationale?  (PFC, )
  Re: 1-/2-dimensional indexes for common columns, rationale?  (Marinos Yannikos, )
   Re: 1-/2-dimensional indexes for common columns, rationale?  ("A. Kretschmer", )
   Re: 1-/2-dimensional indexes for common columns, rationale?  (Craig Ringer, )

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 по дате сообщения:

От: "Scott Marlowe"
Дата:
Сообщение: Re: how can a couple of expensive queries drag my system down?
От: PFC
Дата:
Сообщение: Re: how can a couple of expensive queries drag my system down?