LIKE search and performance - Mailing list pgsql-performance

Hi,
 
I have a table with varchar and text columns, and I have to search through these text in the whole table.
 
An example would be:
SELECT * FROM table
                             WHERE name like '%john%' or street like '%srt%'
 
Anyway, the query planner always does seq scan on the whole table and that takes some time. How can this be optimized or made in another way to be faster?
 
I tried to make indexes on the columns but no success.
 
PG 8.2
 
Regards,
Andy.

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: does VACUUM ANALYZE complete with this error?
Next
From: Vivek Khera
Date:
Subject: Re: performance drop on 8.2.4, reverting to 8.1.4