pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
btree/gist index on date and searching using BETWEEN or >= and <= 2+ messages / 2 participants [nested] [flat]
* btree/gist index on date and searching using BETWEEN or >= and <= @ 2023-09-11 22:19 Wells Oliver <wells.oliver@gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: Wells Oliver @ 2023-09-11 22:19 UTC (permalink / raw) To: 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.oliver@gmail.com <wellsoliver@gmail.com> ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: btree/gist index on date and searching using BETWEEN or >= and <= @ 2023-09-12 00:08 Tom Lane <tgl@sss.pgh.pa.us> parent: Wells Oliver <wells.oliver@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2023-09-12 00:08 UTC (permalink / raw) To: Wells Oliver <wells.oliver@gmail.com>; +Cc: pgsql-admin Wells Oliver <wells.oliver@gmail.com> writes: > Is there a meaningful difference index/plan-wise searching where DATE > BETWEEN x AND y versus DATE >= x AND DATE <= y? Nope. > Secondly, would btree be the best index for such a column, or gist/etc? btree. gist can sort of do scalar-inequality searches, but they're not its strength. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-09-12 00:08 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-09-11 22:19 btree/gist index on date and searching using BETWEEN or >= and <= Wells Oliver <wells.oliver@gmail.com> 2023-09-12 00:08 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox