Re: [GENERAL] Multi-column Indexes. What is best Conan?

Поиск
Список
Период
Сортировка
От dustin sallings
Тема Re: [GENERAL] Multi-column Indexes. What is best Conan?
Дата
Msg-id Pine.NEB.4.10.9903091934110.425-100000@mobile
обсуждение исходный текст
Ответ на Multi-column Indexes. What is best Conan?  (Rodney McDuff <ccmcduff@its.uq.edu.au>)
Список pgsql-general
On Wed, 10 Mar 1999, Rodney McDuff wrote:

    Those do two different things.  If you always plan using doing
lookups on both of those columns at the same time, it only makes sense to
do one index with both.  If you rarely do, but do lots of lookups using
either, then do more than one index.  You also might want to do both,
depending on what you're doing.

    I think a good rule of thumb is to index as much as you can as
long as it doesn't slow down your inserts too much and doesn't eat up too
much disk space.

// Hi
//     When you have a table with multiple columns and you want indexes on
// them you can either
// (a) create index table_idx on table using btree ( col1, col2, ..., col7);
//
// or
// (b) create index table_col1_idx  on table using btree ( col1 );
//     create index table_col2_idx  on table using btree ( col2 );
//     .
//     .
//     .
//
// But what is best?
//
//
//

--
Principal Member Technical Staff, beyond.com    The world is watching America,
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L______________________________________________ and America is watching TV. __


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

Предыдущее
От: Rodney McDuff
Дата:
Сообщение: Multi-column Indexes. What is best Conan?
Следующее
От: Matthew
Дата:
Сообщение: SQL Question