Views and query planner

From: Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Views and query planner
Date: 2006-06-30 12:35:48
Message-ID: 1151670948.27032.5.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Let's say I have a view like this:

CREATE VIEW v_small AS
SELECT c1, c2
FROM t1 JOIN t2 ON t1.c1 = t2.c2

and then I have another view

CREATE VIEW v_big AS
SELECT c1 FROM v_small WHERE c2 > 5

Now, when I do this:

SELECT * FROM v_big WHERE c1 < 1500

Is postgres going to make one query plan, or each view has it own query
plan?

Mike
--
Mario Splivalo
Mob-Art
mario(dot)splivalo(at)mobart(dot)hr

"I can do it quick, I can do it cheap, I can do it well. Pick any two."

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2006-06-30 12:47:31 Re: Views and query planner
Previous Message Jason Farmer 2006-06-30 12:31:16 Re: Using In Clause For a Large Text Matching Query