Re: LIKE search and performance - Mailing list pgsql-performance

From Joshua D. Drake
Subject Re: LIKE search and performance
Date
Msg-id 465717A6.4040503@commandprompt.com
Whole thread Raw
In response to Re: LIKE search and performance  (mark@mark.mielke.cc)
List pgsql-performance
mark@mark.mielke.cc wrote:

> I am speaking of contains, as contains is the one that was said to
> require a seqscan. I am questioning why it requires a seqscan. The
> claim was made that with MVCC, the index is insufficient to check
> for visibility and that the table would need to be accessed anyways,
> therefore a seqscan is required. I question whether a like '%bar%'
> should be considered a high selectivity query in the general case.
> I question whether a worst case should be assumed.

If you are doing %bar% you should be using pg_tgrm or tsearch2.

J


>
> Perhaps I question too much? :-)
>
> Cheers,
> mark
>


pgsql-performance by date:

Previous
From: mark@mark.mielke.cc
Date:
Subject: Re: LIKE search and performance
Next
From: Richard Huxton
Date:
Subject: Re: LIKE search and performance