Re: wildcard search performance with "like"

От: Tom Lane
Тема: Re: wildcard search performance with "like"
Дата: ,
Msg-id: 21504.1137531693@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: 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';
> QUERY PLAN
> 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
http://www.postgresql.org/docs/8.1/static/indexes-opclass.html

            regards, tom lane


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

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