Re: postrgesql query planner wrong desicion

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Kenny Bachman <kenny(dot)bachman17(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: postrgesql query planner wrong desicion
Date: 2022-06-20 17:49:43
Message-ID: CAMkU=1yQCbKTYrwO43-g2CwHD+EBoi149zaVT+Jj6Xg4fcBbfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Jun 20, 2022 at 12:54 AM Kenny Bachman <kenny(dot)bachman17(at)gmail(dot)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

>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Magnus Hagander 2022-06-20 18:14:58 Re: Apply to become an official mirror
Previous Message Peter Geoghegan 2022-06-20 14:47:21 Re: parallel index creation: maintenance_work_mem not honored?