Re: Problem with indices from 10 to 13

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Diniz <daniel(at)flashcourier(dot)com(dot)br>
Cc: "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Problem with indices from 10 to 13
Date: 2021-09-28 22:41:13
Message-ID: 2920281.1632868873@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Daniel Diniz <daniel(at)flashcourier(dot)com(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Daniel Diniz 2021-09-29 02:11:15 RE: Problem with indices from 10 to 13
Previous Message Alan Hodgson 2021-09-28 19:26:23 Re: Problem with indices from 10 to 13