Re: postrgesql query planner wrong desicion - Mailing list pgsql-admin

From Jeff Janes
Subject Re: postrgesql query planner wrong desicion
Date
Msg-id CAMkU=1yQCbKTYrwO43-g2CwHD+EBoi149zaVT+Jj6Xg4fcBbfA@mail.gmail.com
Whole thread Raw
In response to Re: postrgesql query planner wrong desicion  (Kenny Bachman <kenny.bachman17@gmail.com>)
List pgsql-admin
On Mon, Jun 20, 2022 at 12:54 AM Kenny Bachman <kenny.bachman17@gmail.com> wrote:
Hi Jeff,

Thank you so much for your explanation. I realized that the gist index was used many many times. So, I couldn't drop the gist index permanently.

The point of your question is that it is being used even though it is slower.  So the fact that it is used many times doesn't mean anything, we already know it is used.  The better question is, are all of those uses ones which could be done just as well or better with the btree?  I don't see any good ways to answer that definitively, other than by just trying the drop.  But I suspect the answer is 'yes'.  As far as I know, the only reason to use btree_gist is so you can get access to multi-column gist indexes in which one of the *other* columns needs/benefits from gist.  Using it for a single-column index just doesn't make sense to me.

Cheers,

Jeff

pgsql-admin by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: parallel index creation: maintenance_work_mem not honored?
Next
From: Magnus Hagander
Date:
Subject: Re: Apply to become an official mirror