Re: View index question

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: u15074 <u15074(at)hs-harz(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: View index question
Date: 2003-07-29 10:15:03
Message-ID: Pine.LNX.4.56.0307291212110.1370@krusty.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message u15074 2003-07-29 10:24:18 Re: View index question
Previous Message u15074 2003-07-29 09:50:24 View index question