Re: Rearranging simple where clauses

From: Michael Graham <mgraham(at)bloxx(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Rearranging simple where clauses
Date: 2011-05-04 15:35:12
Message-ID: 1304523312.24106.54.camel@brutus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2011-05-04 at 10:49 -0400, Tom Lane wrote:
> Well, it'd require a very large amount of
> type-specific/operator-specific knowledge, and it's not clear what
> would drive the planner towards doing useful rearrangements rather
> than counterproductive ones, and the number of real-world queries
> where it'd actually help doesn't seem to be that large. I've seen one
> or two complaints about that sort of thing, but it's way way down the
> list of serious problems.

I did suspect that the answer would be that the difficulty out ways the
benefit. But in terms of driving the planner don't we always want to be
looking to move all the constants to one side of the expression since
the planner seems to like those?

--
Michael Graham <mgraham(at)bloxx(dot)com>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-05-04 15:49:57 Re: Rearranging simple where clauses
Previous Message Tom Lane 2011-05-04 15:32:50 Re: undead index