Re: explicit JOIN faster than implicit?

From: Eric Schwarzenbach <subscriber(at)blackbrook(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: explicit JOIN faster than implicit?
Date: 2009-08-05 22:04:24
Message-ID: 4A7A01E8.6040200@blackbrook.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Um, ok. You've listed some conditions in order of how well they should
perform and these generally agree with my understanding. But how does
this relate to the relative performance of the semantically equivalent
explicit and implicit join syntaxes?

Eric

Martin Gainty wrote:
> here is my best -> worst join scenario starting with best
> 1)low cardinality tables
> 2)where or join on indexed columns
> 3)function indexes
> 4)concatenated indexes
> .........
> 5)cartesian join ..every row join specifically joins every other row
> from every other table
>
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
> Diese Nachricht dient lediglich dem Austausch von Informationen und
> entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den
> Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>
>
> > Date: Wed, 5 Aug 2009 17:43:20 -0400
> > From: subscriber(at)blackbrook(dot)org
> > To: pgsql-general(at)postgresql(dot)org
> > Subject: [GENERAL] explicit JOIN faster than implicit?
> >
> > I'm in the process taking a large SELECT statement which had been
> > written using implicit join syntax (that is, just listing all the tables
> > in the FROM clause, and listing join conditions in the WHERE clause) and
> > rewriting it to use explicit JOIN syntax (they are all inner joins).
> > This has sped up the query by 50%.
> >
> > This is using Postgres 8.3 on a database with GEQO turned off.
> >
> > Is this what would be expected? Does the query planner / optimizer
> > generally do better with explicit JOIN syntax?
> >
> > Cheers,
> >
> > Eric
> >
> > --
> > Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-general
>
> ------------------------------------------------------------------------
> Get your vacation photos on your phone! Click here.
> <http://windowsliveformobile.com/en-us/photos/default.aspx?&OCID=0809TL-HM>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Schwarzenbach 2009-08-05 22:14:20 Re: explicit JOIN faster than implicit?
Previous Message Martin Gainty 2009-08-05 21:56:30 Re: explicit JOIN faster than implicit?