Re: Views of views, complexity and speed.

From: bombadil(at)wanadoo(dot)es
To: Lista PostgreSql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Views of views, complexity and speed.
Date: 2002-02-05 23:13:50
Message-ID: 20020205231350.GA580@lorien.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Rice 2002-02-05 23:53:30 Re: [HACKERS] PostgreSQL v7.2 Final Release
Previous Message Jan Wieck 2002-02-05 22:40:19 Re: Views of views, complexity and speed.