Re: Postgres not willing to use an index?

Поиск
Список
Период
Сортировка
Искать
От
Mario Splivalo
Тема
Re: Postgres not willing to use an index?
Дата
Msg-id
498FF72F.3000808@megafon.hr
Ответ на
Список
Дерево обсуждения
Postgres not willing to use an index? Mario Splivalo <mario.splivalo@megafon.hr>
Re: Postgres not willing to use an index? Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: Postgres not willing to use an index? Tom Lane <tgl@sss.pgh.pa.us>
Re: Postgres not willing to use an index? Mario Splivalo <mario.splivalo@megafon.hr>
Re: Postgres not willing to use an index? Robert Haas <robertmhaas@gmail.com>
Re: Postgres not willing to use an index? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not willing to use an index? Robert Haas <robertmhaas@gmail.com>
Re: Postgres not willing to use an index? Mario Splivalo <mario.splivalo@megafon.hr>
Re: Postgres not willing to use an index? Mario Splivalo <mario.splivalo@megafon.hr>
Tom Lane wrote:
> 
> Hardly surprising --- a search on the index's lowest-order column would
> require scanning practically all of the index.  (If you think about the
> ordering of the index entries you'll see why.)  If this is a typical
> query then you need a separate index on transaction_time_commit.

Yes, actually I just moved transaction_time_commit column to the 
begining of the index, since, most of the time I run queries based on 
transaction_time_commit and then transaction_client_id and 
transaction_destination_id.

> The fine manual goes into some detail about how to design indexes;
> http://www.postgresql.org/docs/8.3/static/indexes.html
> particularly 11.3, 11.5.

I see it now. I read the manual concerning CREATE INDEX command, and 
there is no mention of multicolumn indices, did not notice Note that 
points to Chapter 11.

	Mike

В списке pgsql-performance по дате отправления
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: inheritance, and plans
От: Mario Splivalo
Дата:
FAQ