Re: explicit JOIN faster than implicit?

From: Martin Gainty <mgainty(at)hotmail(dot)com>
To: <subscriber(at)blackbrook(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: explicit JOIN faster than implicit?
Date: 2009-08-05 21:56:30
Message-ID: BLU142-W5691D571705E45D731288AE0D0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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!
http://windowsliveformobile.com/en-us/photos/default.aspx?&OCID=0809TL-HM

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Schwarzenbach 2009-08-05 22:04:24 Re: explicit JOIN faster than implicit?
Previous Message Eric Schwarzenbach 2009-08-05 21:43:20 explicit JOIN faster than implicit?