Re: Very specialised query

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Very specialised query
Date: 2009-03-30 15:59:05
Message-ID: alpine.DEB.2.00.0903301657300.21772@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Віталій Тимчишин 2009-03-30 16:14:30 Re: Very specialised query
Previous Message Matthew Wakeling 2009-03-30 15:57:16 Re: Very specialised query