pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Diniz <daniel@flashcourier.com.br>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: Problem with indices from 10 to 13
Date: Tue, 28 Sep 2021 18:41:13 -0400
Message-ID: <2920281.1632868873@sss.pgh.pa.us> (raw)
In-Reply-To: <CP2P152MB027497F5EBE88A1491AB833985A89@CP2P152MB0274.LAMP152.PROD.OUTLOOK.COM>
References: <8d2ba21d-2318-4f02-a8fd-04c7d97e22ab.e854021a-9da0-4eba-a51f-e5ff782985ef.17ca0caa-f521-44ce-817a-17cbc713d135@emailsignatures365.codetwo.com>
	<CP2P152MB0274080DF43233A4DD9AE14685A89@CP2P152MB0274.LAMP152.PROD.OUTLOOK.COM>
	<2853352.1632851116@sss.pgh.pa.us>
	<CP2P152MB027497F5EBE88A1491AB833985A89@CP2P152MB0274.LAMP152.PROD.OUTLOOK.COM>

Daniel Diniz <daniel@flashcourier.com.br> writes:
> The index I use is the GIN.

pg_trgm, you mean?  That answers one question, but you still didn't
explain what type h.nome_des is, nor how bytea and convert_from()
are getting into the picture.

The second part of that is probably not critical, since the planner
should be willing to reduce the convert_from() call to a constant
for planning purposes, so I'm unclear as to why the estimate for
the ilike clause is so bad.  Have you tried increasing the statistics
target for h.nome_des to see if the estimate gets better?

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <2920281.1632868873@sss.pgh.pa.us>
Permalink:  ../2920281.1632868873@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2920281.1632868873@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@flashcourier.com.br, pgsql-performance@lists.postgresql.org
  Subject: Re: Problem with indices from 10 to 13
  In-Reply-To: <2920281.1632868873@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