btree/gist index on date and searching using BETWEEN or >= and <=

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: btree/gist index on date and searching using BETWEEN or >= and <=
Date: 2023-09-11 22:19:06
Message-ID: CAOC+FBUw1fcnNV-4gTx610ZaU-=Znc-ZcTTPe9CzNXhBX4smSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Is there a meaningful difference index/plan-wise searching where DATE
BETWEEN x AND y versus DATE >= x AND DATE <= y?

Secondly, would btree be the best index for such a column, or gist/etc?

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2023-09-12 00:08:14 Re: btree/gist index on date and searching using BETWEEN or >= and <=
Previous Message Wells Oliver 2023-09-11 21:51:53 Re: pg_stat_statements_info