Re: Very specialised query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 30 Mar 2009, Marc Mamin wrote:
But I often read that BETWEEN is faster than using 2 comparison operators.

http://www.postgresql.org/docs/current/static/functions-comparison.html says otherwise.

a BETWEEN x AND y

is equivalent to

a >= x AND a <= y

There is no difference between the two respective forms apart from the CPU cycles required to rewrite the first one into the second one internally.

Matthew

--
Don't worry!  The world can't end today because it's already tomorrow
in Australia.

--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux