Rearranging simple where clauses

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

Hi,

I was playing around with some sql in postgres and got to wondering why
the optimiser can't figure out that rearranging some expressions can
result in massive improvements in the queue plan. For example id + 5 <
100 compared with id < 100 - 5.

Is it simply that no one has go around to doing it or is there some
deeper reasons? It's not really important I'm just curious.

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-05-04 13:51:51 Re: pervasiveness of surrogate (also called synthetic) keys
Previous Message Jakub Królikowski 2011-05-04 13:43:35 Default Operator Class for datatype