Re: view or index to optimize performance - Mailing list pgsql-general

From Klein Balázs
Subject Re: view or index to optimize performance
Date
Msg-id 20051221214938.E18B53E45DA@graveyard.mail.t-online.hu
Whole thread Raw
In response to Re: view or index to optimize performance  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: view or index to optimize performance
List pgsql-general
I thought that if I used a view to retrieve data its content might be cached
so it would make the query faster.

Am Mittwoch, 21. Dezember 2005 21:27 schrieb Klein Balázs:
> Or should I instead create a view that contains only the biodata and
select
> from that? But will postgres use the indexes than? Would that be a better
> approach?

Whether the query is executed by a view or typed in in its full form by hand

is completely irrelevant to the question whether indexes are used or should
be created.  Views do not optimize anything.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: view or index to optimize performance
Next
From: Greg Stark
Date:
Subject: Re: Indices for select count(*)?