Re: wildcard search performance with "like"

От: Tom Lane
Тема: Re: wildcard search performance with "like"
Дата: ,
(см: обсуждение, исходный текст)
Ответ на: wildcard search performance with "like"  (Yantao Shi)
Список: pgsql-performance

Yantao Shi <> writes:
> testdbspc=# explain select file_name from catalog where file_name like
> 'MOD04_L2.A2005311.%.004.2005312013%.hdf';
> Seq Scan on catalog  (cost=0.00..429.00 rows=1 width=404)
>   Filter: (file_name ~~ 'MOD04_L2.A2005311.%.004.2005312013%.hdf'::text)
> (2 rows)

I'm betting you are using a non-C locale.  You need either to run the
database in C locale, or to create a special index type that is
compatible with LIKE searches.  See

            regards, tom lane

В списке pgsql-performance по дате сообщения:

От: Mark Kirkwood
Сообщение: Re: Suspending SELECTs
От: Hari Warrier
Сообщение: Getting pg to use index on an inherited table (8.1.1)