From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Stefan Sturm <stefan(dot)s(dot)sturm(at)googlemail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Optimizing a like-cause |
Date: | 2008-07-22 22:07:47 |
Message-ID: | Pine.LNX.4.64.0807230201470.11363@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Reyes | 2008-07-22 22:13:16 | Re: COPY between 7.4.x and 8.3.x |
Previous Message | Francisco Reyes | 2008-07-22 22:07:20 | Re: Substitute a variable in PL/PGSQL. |