RE: Problem with indices from 10 to 13

From: Daniel Diniz <daniel(at)flashcourier(dot)com(dot)br>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-29 02:11:15
Message-ID: CP2P152MB0274CC07F4D81971F642FBA185A99@CP2P152MB0274.LAMP152.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom,

"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 column type is: nome_des | character varying(60)

"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?"
How do i increase the statistics target for h.nome_des?
And why uploading the dump at 10 and at 13 is there this difference?

Thanks

[cid:flashcourier_6bc44896-f19b-4119-a728-f70d866e7cdd.png]

Daniel Diniz
Desenvolvimento

Cel.: 11981464923

www.flashcourier.com.br<http://www.flashcourier.com.br>

[cid:SocialLink_Facebook_32x32_11ddcb69-c640-49e0-88b2-e1038ba38ffa.png]<https://www.facebook.com/flashcourieroficial> [cid:SocialLink_Instagram_32x32_1a56219d-8d68-474a-8e29-0e536d8241d4.png] <https://www.instagram.com/flashcourieroficial> [cid:SocialLink_Linkedin_32x32_6bb30d6c-bdcd-4446-ace2-9daa6eeb5e16.png] <https://www.linkedin.com/company/flashcourieroficial>

#SomosTodosFlash #GrupoMOVE3
[cid:QR7a1d4c80-9fed-4206-a9dd-ab8cda250534.png]

[cid:whatsappimage2021-08-31at18.36.01_c1d35f2c-7adc-42cd-98ff-acbc6b165aa6.jpeg]<https://premio.reclameaqui.com.br/votacao>

"Esta mensagem e seus anexos são dirigidos exclusivamente para os seus destinatários, podendo conter informação confidencial e/ou legalmente privilegiada. Se você não for destinatário desta mensagem, não deve revelar, copiar, distribuir ou de qualquer forma utilizá-la. A empresa não se responsabiliza por alterações no conteúdo desta mensagem depois do seu envio."

________________________________
De: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Enviado: terça-feira, 28 de setembro de 2021 19:41
Para: 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>
Assunto: Re: Problem with indices from 10 to 13

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 Justin Pryzby 2021-09-29 02:18:03 Re: Problem with indices from 10 to 13
Previous Message Tom Lane 2021-09-28 22:41:13 Re: Problem with indices from 10 to 13