Re: intercepting where clause on a view or other performance tweak

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: intercepting where clause on a view or other performance tweak
Дата
Msg-id 14368.1353078307@sss.pgh.pa.us
обсуждение исходный текст
Ответ на intercepting where clause on a view or other performance tweak  (Russell Keane <Russell.Keane@inps.co.uk>)
Ответы Re: intercepting where clause on a view or other performance tweak  (Russell Keane <Russell.Keane@inps.co.uk>)
Список pgsql-performance
Russell Keane <Russell.Keane@inps.co.uk> writes:
> Running the following query takes 56+ ms as it does a seq scan of the whole table:
> SELECT CODE FROM stuff
>    WHERE SEARCH_KEY LIKE 'AAAAAA%'

Why don't you create an index on search_key, and forget all these other
machinations?  (If your locale isn't C you'll need to use a
varchar_pattern_ops index.)

            regards, tom lane


В списке pgsql-performance по дате отправления:

Предыдущее
От: Russell Keane
Дата:
Сообщение: intercepting where clause on a view or other performance tweak
Следующее
От: Russell Keane
Дата:
Сообщение: Re: intercepting where clause on a view or other performance tweak