Re: Optimizing a like-cause - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: Optimizing a like-cause
Date
Msg-id Pine.LNX.4.64.0807230201470.11363@sn.sai.msu.ru
Whole thread Raw
In response to Optimizing a like-cause  (Stefan Sturm <stefan.s.sturm@googlemail.com>)
List pgsql-general
We have contrib/wildspeed extension which uses new partial
match feature of GIN index. See our presentation
http://www.pgcon.org/2008/schedule/events/58.en.html
It index all permutations, so index is very big, but for not
long read-only sstring it works fast.

Oleg
On Tue, 22 Jul 2008, Stefan Sturm wrote:

> Hello,
>
> I'm developing a autocomplete Feature using php and PostgreSQL 8.3.
> To fill the autocomplete box I use the following SQL Statement:
> select * from _table_ where upper( _field_ ) like '%STRING%';
>
> This SQL Statement takes 900 ms on a Table with 300.000 entries.
>
> What can I do to speed up the Statement? What Index can I set?
>
> Thanks for your Help,
> Stefan Sturm
>
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

pgsql-general by date:

Previous
From: "Francisco Reyes"
Date:
Subject: Re: Substitute a variable in PL/PGSQL.
Next
From: "Francisco Reyes"
Date:
Subject: Re: COPY between 7.4.x and 8.3.x