greater than vs between in where clause

From: Yambu <hyambu(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: greater than vs between in where clause
Date: 2020-11-05 14:49:21
Message-ID: CALhHtcATeM5BTrN6DPZgN8L+fhMgiAmoxKt-VqTFAiu6NJTiTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

May i know if there is a difference in speed between 1 ,2 and 3 below , if
column start_date is indexed

1. select * from table_1 where start_date > '1 Oct 2020'
2. select * from table_1 where start_date between '1 Oct 2020' and now()
3. select * from table_1 where start_date between '1 Oct 2020' and '5 Nov
2020 23:59:59'

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-11-05 14:58:11 Re: greater than vs between in where clause
Previous Message Michael Lewis 2020-11-05 14:15:02 Re: Large index