Jan Wieck wrote:
On 10/27/2005 7:29 AM, Richard Huxton wrote:
Svenne Krap wrote:
What do you mean exactly but "pushing conditions inside" ?
If I have something like "SELECT * FROM complicated_view WHERE foo =
7" then the planner can look "inside" complicated_view and see where
it can attach the condition "foo=7", rather than running the query and
applying the condition at the end.
Sorry, but the planner doesn't attach the condition anywhere. It is the
rewriter that takes the actual query, replaces the views rangetable and
expression entries with the actual underlying objects and adds the views
condition with an AND to the queries condition. Simply example:
Thanks for the correction Jan.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match