Re:

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hung Nguyen <hungnq1989@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-07-02T13:45:31Z
Lists: pgsql-bugs
Hung Nguyen <hungnq1989@gmail.com> writes:
> I'm not sure if this is really a bug, but its' super weird if the query
> planner favors the trigram index over the b-tree index for joining is not
> optimal to me. Thank you so much.

I agree that sounds bad, but you've provided a conclusion with no
supporting evidence, making it impossible to investigate.  A
self-contained test case that behaves this way would be ideal.
Otherwise, please see

https://wiki.postgresql.org/wiki/Slow_Query_Questions

and provide the info suggested therein.

			regards, tom lane



Commits

  1. Improve GIN cost estimation