Re: view or index to optimize performance

From: Klein Balázs <Balazs(dot)Klein(at)axelero(dot)hu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: view or index to optimize performance
Date: 2005-12-21 21:49:29
Message-ID: 20051221214938.E18B53E45DA@graveyard.mail.t-online.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-12-21 21:54:08 Re: Indices for select count(*)?
Previous Message Peter Eisentraut 2005-12-21 21:42:54 Re: view or index to optimize performance