Re: efficiency of wildcards at both ends
| От | Sam Z J |
|---|---|
| Тема | Re: efficiency of wildcards at both ends |
| Дата | |
| Msg-id | CAGeKEGaSHykWJavud+e_xRLkFiLd8Mtc80kZaG+BY_3TYN4VOg@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: efficiency of wildcards at both ends (Alan Hodgson <ahodgson@simkin.ca>) |
| Список | pgsql-general |
thank you all for the useful information =D
--
On Wed, Jun 20, 2012 at 1:39 PM, Alan Hodgson <ahodgson@simkin.ca> wrote:
On Wednesday, June 20, 2012 01:10:03 PM Sam Z J wrote:Indexing helps not at all. If the search string starts with a wildcard you
> 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 and roughly how much more
> space is needed for the index?
>
will always get a sequential scan of the whole table.
Look at the full text search documentation for a better approach.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Zhongshi (Sam) Jiang
sammyjiang721@gmail.com
sammyjiang721@gmail.com
В списке pgsql-general по дате отправления: