Re: optimizing LIKE '%2345' queries
От
Chris
Тема
Re: optimizing LIKE '%2345' queries
Дата
Msg-id
44AB0652.2080606@gmail.com
Ответ на
Список
Дерево обсуждения
optimizing LIKE '%2345' queries Gene <genekhart@gmail.com>
Re: optimizing LIKE '%2345' queries Mario Weilguni <mweilguni@sime.com>
Is postgresql ca do the job for software deployed in ASP ou SaaS mode? David Gagnon <dgagnon@siunik.com>
Re: Is postgresql ca do the job for software deployed in ASP ou SaaS mode? "Chris Hoover" <revoohc@gmail.com>
Re: Is postgresql ca do the job for software deployed in ASP ou SaaS mode? "Guoping Zhang" <guoping.zhang@nec.com.au>
Re: Is postgresql ca do the job for software deployed in ASP ou SaaS mode? Richard Broersma Jr <rabroersma@yahoo.com>
Re: Is postgresql ca do the job for software deployed in "Craig A. James" <cjames@modgraph-usa.com>
Re: optimizing LIKE '%2345' queries Tarhon-Onu Victor <mituc@iasi.rdsnet.ro>
Re: optimizing LIKE '%2345' queries Gene <genekhart@gmail.com>
Re: optimizing LIKE '%2345' queries Chris <dmagick@gmail.com>
Gene wrote:
> Thanks for the suggestion. Actually I went ahead and created a reverse
> function using plpgsql, created an index using reverse column and now
> my queries use "where reverse(column) like reverse('%2345') and it's
> using the index like i hoped it would! Now if I could figure out how
> to optimize like '%2345%' queries. I don't want to create many
> indexes though the table is very write heavy.
You can't because that text can be anywhere inside the database field,
so the whole field basically has to be checked to see if it's there.
You could check out full text indexing (tsearch2).
http://www.designmagick.com/article/27/PostgreSQL/Introduction-to-Full-Text-Indexing
--
Postgresql & php tutorials
http://www.designmagick.com/
В списке pgsql-performance по дате отправления