Re: Inlining of functions (doing LIKE on an array) - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Inlining of functions (doing LIKE on an array)
Date
Msg-id CAMkU=1w+QQofiijZgHziYxhXjz6CNm_CDkRN_Wqif5ijQT6qjQ@mail.gmail.com
Whole thread Raw
In response to Inlining of functions (doing LIKE on an array)  ("ldh@laurent-hasson.com" <ldh@laurent-hasson.com>)
List pgsql-performance
On Thu, Nov 10, 2016 at 10:54 PM, ldh@laurent-hasson.com <ldh@laurent-hasson.com> wrote:

Hello,

 

I am trying to implement an efficient “like” over a text[]. I see a lot of people have tried before me and I learnt a lot through the forums.


Have you looked at parray_gin?


(Also on PGXN, but I don't know how up-to-date it is there)

Or you could create an regular pg_trgm index on the expression:

array_to_string("ICD9_DGNS_CD",'<some safe delimiter>')

If you can find a safe delimiter to use (one that can't be part of the text[]).

The performance of these options will depend on both the nature of your data and the nature of your queries.

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inlining of functions (doing LIKE on an array)
Next
From: "ldh@laurent-hasson.com"
Date:
Subject: Re: Inlining of functions (doing LIKE on an array)