Re: Partitions and indexes

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Partitions and indexes
Дата
Msg-id 4258A398-A6E4-441A-83BB-F69E46B6A26E@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на Re: Partitions and indexes  (Amitabh Kant <amitabhkant@gmail.com>)
Ответы Re: Partitions and indexes  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 26 Feb 2011, at 18:04, Amitabh Kant wrote:

> Now if I partition the table T2 based on field T1id, making sure that each distinct T1id is provided its own child
table
>
> Table T2C1 (inherited from T2, T1id field only contains 1 for all rows)
> Table T2C2 (inherited from T2, T1id field only contains 2 for all rows)
> --
> --
>
> What I would like to know here is that do I need to add an index for T1id field for either T2 or it's inherited
tables(T2C1/T2C2 etc)? 

No. Either would be rather pointless. In the child tables all the values in that index would have the same exact value,
whichyou don't need as constraint exclusion already pointed the planner to the right table. In the parent table there
wouldn'tbe any data to index. 

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4d69400211732483184779!



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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Please help -- Postgres stopped responding ....
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Partitions and indexes