From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ben <bench@silentmedia.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: pg_trgm indexes giving bad estimations?
Date: Wed, 04 Oct 2006 21:54:27 -0400
Message-ID: <5872.1160013267@sss.pgh.pa.us> (raw)
In-Reply-To: <FFBBFAF9-7BA8-42BE-8958-5F6702AB2663@silentmedia.com>
References: <FFBBFAF9-7BA8-42BE-8958-5F6702AB2663@silentmedia.com>
Ben <bench@silentmedia.com> writes:
> How can I get the planner to not expect so many rows to be returned?
Write an estimation function for the pg_trgm operator(s). (Send in a
patch if you do!) I see that % is using "contsel" which is only a stub,
and would likely be wrong for % even if it weren't.
> A possibly related question is: because pg_tgrm lets me set the
> matching threshold of the % operator, how does that affect the planner?
It hasn't a clue about that.
regards, tom lane
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, bench@silentmedia.com
Subject: Re: pg_trgm indexes giving bad estimations?
In-Reply-To: <5872.1160013267@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