Re: View vs. direct Table access

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ambre(at)ebutec(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: View vs. direct Table access
Date: 2002-03-27 16:12:34
Message-ID: 19071.1017245554@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erwin Ambrosch <ambre(at)ebutec(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2002-03-27 16:34:28 Re: grants on functions
Previous Message Jan Wieck 2002-03-27 16:03:32 Re: View vs. direct Table access