Re: "Overlaping" indexes

Поиск
Список
Период
Сортировка
Искать
От
scott.marlowe
Тема
Re: "Overlaping" indexes
Дата
Msg-id
Pine.LNX.4.33.0402021155530.19831-100000@css120.ihs.com
Ответ на
Список
Дерево обсуждения
"Overlaping" indexes "Rigmor Ukuhe" <rigmor.ukuhe@finestmedia.com>
Re: "Overlaping" indexes Tomasz Myrta <jasiek@klaster.net>
Re: "Overlaping" indexes "scott.marlowe" <scott.marlowe@ihs.com>
Re: "Overlaping" indexes Tomasz Myrta <jasiek@klaster.net>
Re: "Overlaping" indexes Rod Taylor <pg@rbt.ca>
Re: "Overlaping" indexes "scott.marlowe" <scott.marlowe@ihs.com>
On Mon, 2 Feb 2004, Tomasz Myrta wrote:

> Dnia 2004-02-02 19:30, U¿ytkownik scott.marlowe napisa³:
> > Not entirely, since it only has to sort two columns, it will be smaller, 
> > and will therefore be somewhat faster.
> 
> Can you say something more about it? Will it be enough faster to keep 
> them both? Did anyone make such tests?

that really depends on the distribution of the third column.  If there's 
only a couple of values in the third column, no big deal.  If each entry 
is unique, and it's a large table, very big deal.

It is only useful to have a three column index if you actually use it.  If 
you have an index on (a,b,c) and select order by b, the index won't get 
used unless the a part is in the where clause.

the other issue is updates.  IT WILL cost more to update two indexes 
rather than one.  Generally, you can drop / readd the index and use 
explain analyze on one of your own queries to see if that helps.

В списке pgsql-performance по дате отправления
От: Tomasz Myrta
Дата:
Сообщение: Re: "Overlaping" indexes
От: Rod Taylor
Дата:
Сообщение: Re: "Overlaping" indexes
FAQ