pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
<-> Operator on Trigram Index
2+ messages / 2 participants
[nested] [flat]

* <-> Operator on Trigram Index
@ 2018-11-13 22:42 Jeffrey Kamei <jeff@windfalldata.com>
  2018-11-15 09:28 ` Re: <-> Operator on Trigram Index Arthur Zakirov <a.zakirov@postgrespro.ru>
  0 siblings, 1 reply; 2+ messages in thread

From: Jeffrey Kamei @ 2018-11-13 22:42 UTC (permalink / raw)
  To: pgsql-general

I'm trying to get the <-> operator to recognize a trigram index (GIST) I've
set on a table. Using `EXPLAIN VERBOSE` I can see the query engine ignoring
the trigram index when using the `<->` operator. However if I use the `%`
operator, the index is found and used. Can you explain why this is
happening? As far as I can tell from the documentation, the `<->` operator
should be using the index as well.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: <-> Operator on Trigram Index
  2018-11-13 22:42 <-> Operator on Trigram Index Jeffrey Kamei <jeff@windfalldata.com>
@ 2018-11-15 09:28 ` Arthur Zakirov <a.zakirov@postgrespro.ru>
  0 siblings, 0 replies; 2+ messages in thread

From: Arthur Zakirov @ 2018-11-15 09:28 UTC (permalink / raw)
  To: Jeffrey Kamei <jeff@windfalldata.com>; pgsql-general

Hello,

On 14.11.2018 01:42, Jeffrey Kamei wrote:
> I'm trying to get the <-> operator to recognize a trigram index (GIST) 
> I've set on a table. Using `EXPLAIN VERBOSE` I can see the query engine 
> ignoring the trigram index when using the `<->` operator. However if I 
> use the `%` operator, the index is found and used. Can you explain why 
> this is happening? As far as I can tell from the documentation, the 
> `<->` operator should be using the index as well.

Yes <-> operator should use a GiST index. Can you show your query and 
its plan?

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-11-15 09:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 22:42 <-> Operator on Trigram Index Jeffrey Kamei <jeff@windfalldata.com>
2018-11-15 09:28 ` Arthur Zakirov <a.zakirov@postgrespro.ru>

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