Optimizing a like-cause - Mailing list pgsql-general

From Stefan Sturm
Subject Optimizing a like-cause
Date
Msg-id 26353992-BFEA-47A9-B73C-02F05B314211@gmail.com
Whole thread Raw
Responses Re: Optimizing a like-cause
Re: Optimizing a like-cause
Re: Optimizing a like-cause
Re: Optimizing a like-cause
List pgsql-general
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

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Problems Restarting PostgreSQL Daemon
Next
From: "Bill Wordsworth"
Date:
Subject: Re: pg_query transaction: auto rollback? begin or start?? commit or end???