Re: pg_trgm indexes giving bad estimations?

От: Tom Lane
Тема: Re: pg_trgm indexes giving bad estimations?
Дата: ,
Msg-id: 5872.1160013267@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: pg_trgm indexes giving bad estimations?  (Ben)
Ответы: Re: pg_trgm indexes giving bad estimations?  (Ben)
Список: pgsql-performance

Скрыть дерево обсуждения

pg_trgm indexes giving bad estimations?  (Ben, )
 Re: pg_trgm indexes giving bad estimations?  (Tom Lane, )
  Re: pg_trgm indexes giving bad estimations?  (Ben, )
   Re: pg_trgm indexes giving bad estimations?  (Tom Lane, )

Ben <> 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


В списке pgsql-performance по дате сообщения:

От: "Carlo Stonebanks"
Дата:
Сообщение: Re: Performance Optimization for Dummies 2 - the SQL
От: Tom Lane
Дата:
Сообщение: Re: UPDATE becomes mired / win32