Re: Left Join Not Using Index? - Mailing list pgsql-general

From Tom Lane
Subject Re: Left Join Not Using Index?
Date
Msg-id 24304.1051075805@sss.pgh.pa.us
Whole thread Raw
In response to Re: Left Join Not Using Index?  (Hunter Hillegas <lists@lastonepicked.com>)
Responses Re: Left Join Not Using Index?  (Hunter Hillegas <lists@lastonepicked.com>)
List pgsql-general
Hunter Hillegas <lists@lastonepicked.com> writes:
> Can anyone point me in another direction to optimize this

AFAICS you cannot improve that without changing the query structure
and/or the database layout.  Because the WHERE clause is a bunch of OR'd
conditions, it's useless for restricting either individual table scan
making up the join --- there is really no implementation short of
forming the entire join described by the FROM ... JOIN ... ON ... part
of the query and then testing each individual row against the WHERE
clause.  While that is the abstract semantic model implied by the SQL
spec, it's not exactly how you want a query to really be done :-(.

            regards, tom lane


pgsql-general by date:

Previous
From: Hunter Hillegas
Date:
Subject: Re: Left Join Not Using Index?
Next
From: Hunter Hillegas
Date:
Subject: Re: Left Join Not Using Index?