Which is faster: BETWEEN or 2 WHERE statements? - Mailing list pgsql-novice

From Chuck Roberts
Subject Which is faster: BETWEEN or 2 WHERE statements?
Date
Msg-id 11ce83be23d519810420717592ceab78@mail.gmail.com
Whole thread Raw
Responses Re: Which is faster: BETWEEN or 2 WHERE statements?  (Thom Brown <thom@linux.com>)
List pgsql-novice

Psql 8.4

 

Which will help the query run faster on my version of Psql;

 

1) WHERE (mydate >= '2015-01-01') AND (mydate<='2015-01-31')

 

2) WHERE (mydate BETWEEN '2015-01-01' AND '2015-01-31')

 

I'm just curious.  We have 500,000+ records to go through on this one table, and query involves 2 tables. The date field 'mydate' is not indexed.

 

Thank you!

 

pgsql-novice by date:

Previous
From: Lacey Powers
Date:
Subject: Re: How to create tables and copy records in blocks?
Next
From: Thom Brown
Date:
Subject: Re: Which is faster: BETWEEN or 2 WHERE statements?