Re: The order of fields around the "=" in the WHERE conditions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mike Quinn" <mquinn(at)co(dot)merced(dot)ca(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: The order of fields around the "=" in the WHERE conditions
Date: 2006-04-03 21:58:02
Message-ID: 17162.1144101482@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Mike Quinn" <mquinn(at)co(dot)merced(dot)ca(dot)us> writes:
> -- The order of fields around the "=" in the WHERE conditions
> -- affects the query plan.

BTW, what's the datatype(s) of the join columns? The behavior looks
consistent with the idea that the planner doesn't think it can commute
the join conditions, which would be a bug/omission in the set of
operators existing for the datatype(s). I believe we've got commutators
for all the standard '=' operators, but a contrib or third-party
datatype might be missing this.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Mair 2006-04-04 00:39:38 bad performance on Solaris 10
Previous Message Tom Lane 2006-04-03 21:35:07 Re: The order of fields around the "=" in the WHERE conditions