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

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?

if the answers are too long, please point me to the relavant text =D 

thanks

--
Zhongshi (Sam) Jiang
sammyjiang721@gmail.com

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: 32-bit libpq with 64-bit server
Next
From: utsav
Date:
Subject: Re: RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION