Re: Index on View ?

Richard Huxton <dev@archonet.com>

From: "Richard Huxton" <dev@archonet.com>
To: "Keith Gray" <keith@heart.com.au>, "PostgreSQL" <pgsql-sql@postgresql.org>
Date: 2001-04-05T08:45:59Z
Lists: pgsql-sql
From: "Keith Gray" <keith@heart.com.au>

> Is it possible (feasible) to create an index on a view.
>
> We have a large table and a defined sub-set (view)
> from this table, would it be possible to keep an index
> of the sub-set.

I don't think so - the view is basically just a select rule that rewrites
queries based on it.

Indexes on underlying tables should be used though. Difficult to suggest
what indices you might need without knowing the view/tables/queries
involved.

- Richard Huxton