Thread: what do postgresql with view ?

what do postgresql with view ?

From
elrik-de-melnibone@ifrance.com (elrik)
Date:
In information i have:

1. when creating view : PostgreSQL parse the query and stock the tree query.
2. when using : PostgreSQL use this tree like a subselect.

my question : Do PostgreSQL makes an analyse of the resulted tree ?


Re: what do postgresql with view ?

From
elrik-de-melnibone@ifrance.com (elrik)
Date:
elrik-de-melnibone@ifrance.com (elrik) wrote in message news:<762279de.0403301005.502b3cd3@posting.google.com>...
> In information i have:
> 
> 1. when creating view : PostgreSQL parse the query and stock the tree query.
> 2. when using : PostgreSQL use this tree like a subselect.
> 
> my question : Do PostgreSQL makes an analyse of the resulted tree ?


I can answer by myself : YES !

In fact the probleme is when i have more than 11 tables in the query...


Re: what do postgresql with view ?

From
Rod Taylor
Date:
> In fact the probleme is when i have more than 11 tables in the query...

Please post the EXPLAIN ANALYZE results of the problematic query, as
well as the definition of any views it uses.

Also, SHOW from_collapse_limit;



Re: what do postgresql with view ?

From
"scott.marlowe"
Date:
On 31 Mar 2004, elrik wrote:

> elrik-de-melnibone@ifrance.com (elrik) wrote in message news:<762279de.0403301005.502b3cd3@posting.google.com>...
> > In information i have:
> > 
> > 1. when creating view : PostgreSQL parse the query and stock the tree query.
> > 2. when using : PostgreSQL use this tree like a subselect.
> > 
> > my question : Do PostgreSQL makes an analyse of the resulted tree ?
> 
> 
> I can answer by myself : YES !
> 
> In fact the probleme is when i have more than 11 tables in the query...

Sounds like you might be wresting with the genetic query optimizer.  Try 
turning up the geqo theshold and see if things work better.