Re: View index question

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: View index question
Дата
Msg-id Pine.LNX.4.56.0307291212110.1370@krusty.credativ.de
обсуждение исходный текст
Ответ на View index question  (u15074 <u15074@hs-harz.de>)
Ответы Re: View index question  (u15074 <u15074@hs-harz.de>)
Список pgsql-general
u15074 writes:

> Each of the tables in each scheme will store a lot rows. That is also why I
> decided to split the tables over the schemes.

This is absolutely pointless.  Splitting a table over several schemas will
have no effect on performance or storage (except possibly making
everything slower because the planner gets confused).

> My first question is, if there exists a possibility to add an index on
> the views new field, representing the name of the scheme?

No, you cannot index a view.

> Now, if I execute queries on this view, none of my indexes seem to be
> used.  Queries on the other two views, use my indexes though. Are
> indexes not used on view queries, if a view is based on other views?

Queries on views may make use of indexes like any other query.  To examine
index usage, please read the following:

http://www.postgresql.org/docs/7.3/static/indexes-examine.html

--
Peter Eisentraut   peter_e@gmx.net

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

Предыдущее
От: u15074
Дата:
Сообщение: View index question
Следующее
От: u15074
Дата:
Сообщение: Re: View index question