Re: BUG #14032: trigram index is not used for '=' operator

Поиск
Список
Период
Сортировка
От Emre Hasegeli
Тема Re: BUG #14032: trigram index is not used for '=' operator
Дата
Msg-id CAE2gYzzcnKzp1XYDVvG21U7DeV71oGRF8J-w=oc4atgZfvjxKQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14032: trigram index is not used for '=' operator  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: BUG #14032: trigram index is not used for '=' operator  (Ruslan Zakirov <ruslan.zakirov@gmail.com>)
Re: BUG #14032: trigram index is not used for '=' operator  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-bugs
> The main problem is likely to be that there is already a really good
> index type for speeding up equality queries (btree), and adding
> another (generally much worse) alternative is likely to confuse the
> planner more than anything.  Is it really worth taking the performance
> hit on executing the equality query in order to avoid just keeping a
> second btree index?

I don't think it is a problem.  I think btree would usually have lower
cost than GIN and therefore would be preferred by the planner.  The
other opclasses are providing operators for such cases.  For example,
range_ops(GiST) supports =, inet_ops(GiST) supports all basic
comparisons.

It is likely that pg_trgm index created for pattern matching would be
sufficient for equality for some users.  We shouldn't force them to
create an additional btree index.

> If I could somehow turn this into an extension module that installed
> with pg_trgm as a dependency, rather than reaching into pg_trgm's
> internals, then it might be worthwhile putting something like this on
> PGXN.  But I don't know how to do that.  And it doesn't seem
> worthwhile to change pg_trgm itself in this way.

I don't think it is useful to have such a small extension, even if it
would be possible.

> But in any case, it isn't a bug that pg_trgm doesn't do everything it
> theoretically could do.

I agree.  Maybe we can add it to the next commitfest?

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robbie Harwood
Дата:
Сообщение: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used