Indexing Question

Поиск
Список
Период
Сортировка
От Mike
Тема Indexing Question
Дата
Msg-id 1137100560.467461.151980@o13g2000cwo.googlegroups.com
обсуждение исходный текст
Ответы Re: Indexing Question  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-general
Hi,

My table structure is the following:

tbl_A ----one-to-many---> tbl_B ----one-to-many---> tbl_C

Since it was important for me to trace back tbl_C records back to
tbl_A, I placed a tbl_A_id inside tbl_C.

Now, in order to optimize my database for speed, I want to index my
tbl_B for it's tbl_A_id. So far so good. Now, with tbl_C, it makes
sense that all records of tbl_A sit next to eachother so I could index
tbl_A_id (which are not used as often in my queries), or index by
tbl_B_id. Or both of them.

To be clear, my question is: Does it make sense for me to index a table
by field_1 with the intention of having postgreSQL place those records
next to each other for faster queries that wouldn't necessarily
reference field_1?

Thanks,
Mike


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

Предыдущее
От: ptjm@interlog.com (Patrick TJ McPhee)
Дата:
Сообщение: Re: Plans for 8.2?
Следующее
От: Baldur Norddahl
Дата:
Сообщение: Re: Plans for 8.2?