Re: Throwing unnecessary joins away

From: Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Throwing unnecessary joins away
Date: 2006-01-12 13:41:30
Message-ID: 34608c0c0601120541wd910da3s@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,
As far as I know SQL Server has some similar feature. It does not join
if not necessary, more exactly: if the result would be the same if it
joined the table.
Here is another example:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbugen9/00000468.htm
This would be a fantastic feature.
Best Regards,
Otto

2006/1/12, Alessandro Baretta <a(dot)baretta(at)barettadeit(dot)com>:
> Ottó Havasvölgyi wrote:
> > Hi all,
> >
> > Is PostgreSQL able to throw unnecessary joins?
> > For example I have two tables, and I join then with their primary keys,
> > say type of bigint . In this case if I don't reference to one of the
> > tables anywhere except the join condition, then the join can be eliminated.
> > Or if I do a "table1 left join table2 (table1.referer=table2.id)" (N :
> > 1 relationship), and I don't reference table2 anywhere else, then it is
> > unnecessary.
>
> It cannot possibly remove "unnecessary joins", simply because the join
> influences whether a tuple in the referenced table gets selected and how many times.
>
> Alex
>
>
> --
> *********************************************************************
> http://www.barettadeit.com/
> Baretta DE&IT
> A division of Baretta SRL
>
> tel. +39 02 370 111 55
> fax. +39 02 370 111 54
>
> Our technology:
>
> The Application System/Xcaml (AS/Xcaml)
> <http://www.asxcaml.org/>
>
> The FreerP Project
> <http://www.freerp.org/>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Treat 2006-01-12 14:48:25 query slower on 8.1 than 7.3
Previous Message Alessandro Baretta 2006-01-12 12:35:07 Re: Throwing unnecessary joins away