Multiple indexes or multi-column index?

Поиск
Список
Период
Сортировка
От Jeff Boes
Тема Multiple indexes or multi-column index?
Дата
Msg-id ajbpaf$14va$1@news.hub.org
обсуждение исходный текст
Ответы Re: Multiple indexes or multi-column index?  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-admin
Given a large (100,000+ rows) table such as:

CREATE TABLE foo (
  a INTEGER,
  b INTEGER,
  c TIMESTAMP,
  d TEXT
  /* possibly several more columns in here */
);

What are the pros and cons of these two different approaches to indexes?

CREATE huge_index ON foo (a,b,c,d);

vs.

CREATE a_index ON foo (a);
CREATE b_index ON foo (b);
CREATE c_index ON foo (c);
CREATE d_index ON foo (d);

--
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise

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

Предыдущее
От: Thomas O'Connell
Дата:
Сообщение: Re: performance tuning: shared_buffers, sort_mem; swap
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Multiple indexes or multi-column index?