Re: View vs. direct Table access - Mailing list pgsql-general

From Tom Lane
Subject Re: View vs. direct Table access
Date
Msg-id 19071.1017245554@sss.pgh.pa.us
Whole thread Raw
In response to View vs. direct Table access  (Erwin Ambrosch <ambre@ebutec.com>)
List pgsql-general
Erwin Ambrosch <ambre@ebutec.com> writes:
> Are Views per default slower than direct table access?

No; they should be pretty much exactly the same (since a view is really
nothing but a macro that gets expanded in-line in the text of a query
that references it).

I speculate that you've got a complex query that is confusing the
planner into making some bad choices, but without more details
--- like a complete example and EXPLAIN output --- it's hard to say.

            regards, tom lane

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: View vs. direct Table access
Next
From: Darren Ferguson
Date:
Subject: Re: grants on functions