Re: efficiency of wildcards at both ends - Mailing list pgsql-general

From Jasen Betts
Subject Re: efficiency of wildcards at both ends
Date
Msg-id js402l$pde$1@reversiblemaps.ath.cx
Whole thread Raw
In response to efficiency of wildcards at both ends  (Sam Z J <sammyjiang721@gmail.com>)
List pgsql-general
On 2012-06-20, Sam Z J <sammyjiang721@gmail.com> wrote:
> --0016e6d999db24c4c704c2ea7a97
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all
>
> I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
> How efficient is it if that's the only search criteria against a large
> table? how much does indexing the column help

fulltextsearch can be abused with a custom lexer that fragments the string in every possible
way and that can be matched against, but not using LIKE.

Works OK on tables with tens of thaousands of rows haven't tried it on
larger rows.


--
⚂⚃ 100% natural

pgsql-general by date:

Previous
From: Joe Van Dyk
Date:
Subject: Re: row_to_json question
Next
From: Jasen Betts
Date:
Subject: Re: Extensions and roles for access administration