Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
Lists: pgsql-general

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.

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


pgsql-general by date

Next:From: Merlin MoncureDate: 2011-05-04 13:51:51
Subject: Re: pervasiveness of surrogate (also called synthetic) keys
Previous:From: Karsten HilbertDate: 2011-05-04 13:43:35
Subject: Re: pervasiveness of surrogate (also called synthetic) keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group