Re: Views of views, complexity and speed. - Mailing list pgsql-general

From bombadil@wanadoo.es
Subject Re: Views of views, complexity and speed.
Date
Msg-id 20020205231350.GA580@lorien.net
Whole thread Raw
In response to Re: Views of views, complexity and speed.  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-general
El martes 05 de febrero, Jan Wieck escribió:
> >  In order to avoid complexity, some views looks in other views and
> >  join them for getting data.
> >
> >  I see queries against that views result slower than queries against
> >  plane tables or simple views by an order of magnitude (when not two).
> >
> >  My question is: if I would make complex views looking in plain tables
> >  instead of other views, could I gain speed with the cost of more
> >  difficult maintainability and readability?
> >
> >  Sorry for lazy data and arguments. If any of you think that detailed
> >  tables and views may help, i can send them without problem.
>
>     Asking  for  qualified  opinions and comments "only" and then
>     beeing lazy on data and arguments, tztztz ... man!

 Emmmm, sorry 0:)

 I know that message was very inappropiate.

>     The question I have is what do you really compare?  You  said
>     "looking  in  plain tables instead of other views". Does that
>     mean your query is faster when you build one big view against
>     all  the base tables instead of cascaded views, or what?

 Now I am experimenting with this. It is what I should have done before
 asking lazily in list.

 But...

>     What is the performance difference if you  instead  of  using  the
>     cascaded  views  query  all  the  base  tables  in a big join
>     directly?

 This is real question in my mind. Do it exist any reason for views in
 cascade being slower than a complex view with all tables joined? Is it
 the planner well tuned for views in cascade?

 I will continue making experiments. In fact, i have win a few seconds
 in some of my views.

 Sorry again for laziness (and my pathetic english) and thanks for
 your interest.

 Greets.

                             David


pgsql-general by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: Re: newbie: Creating a function
Next
From: Justin Clift
Date:
Subject: Re: ipc-daemon error