pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kenny Bachman <kenny.bachman17@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: postrgesql query planner wrong desicion
Date: Fri, 17 Jun 2022 10:19:32 -0400
Message-ID: <1217742.1655475572@sss.pgh.pa.us> (raw)
In-Reply-To: <CAC0w7LKM16y0FuBBqMP6wkaRR2JHvLjYcSg-O8URerH4_8Yi2g@mail.gmail.com>
References: <CAC0w7LKM16y0FuBBqMP6wkaRR2JHvLjYcSg-O8URerH4_8Yi2g@mail.gmail.com>

Kenny Bachman <kenny.bachman17@gmail.com> writes:
> With GIST Index: (Total exec time : 34s)

> Index Scan using "Pool_Party_Code_gist" on "Pool_Party"  (cost=0.28..8.30
> rows=1 width=4) (actual time=0.097..0.097 rows=1 loops=330870)
>                                        Index Cond: (("Code")::text =
> 'TEAM-FIXPOWERUSER'::text)

> Without GIST Index: (Total exec time: 4s)

> Index Scan using "Pool_Party_Code_idx" on "Pool_Party"  (cost=0.42..8.44
> rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=330870)
>                                        Index Cond: (("Code")::text =
> 'TEAM-FIXPOWERUSER'::text)

Why do you have a gist index on a column that's apparently plain
text (or varchar)?  It seems kinda pointless, and the more so if
it duplicates a btree index.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <1217742.1655475572@sss.pgh.pa.us>
Permalink:  ../1217742.1655475572@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1217742.1655475572@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kenny.bachman17@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: postrgesql query planner wrong desicion
  In-Reply-To: <1217742.1655475572@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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