Re: Simple Question of Performance ILIKE or Lower

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Simple Question of Performance ILIKE or Lower
Дата
Msg-id 20060118230230.GZ17896@pervasive.com
обсуждение исходный текст
Ответ на Simple Question of Performance ILIKE or Lower  (Marcos <mjs_ops@gmx.net>)
Список pgsql-performance
On Wed, Jan 18, 2006 at 09:10:30AM +0000, Marcos wrote:
> Hi,
>
> I have a simple question about performance using two resources.
>
> What's have the best performance?
>
> lower( col1 ) LIKE lower( 'myquestion%' )
>
> OR
>
> col1 ILIKE 'myquestion%'

If you index lower( col1 ), then the former would likely perform better
(if the optimizer knows it could use the index in that case). Otherwise
I suspect they'd be the same.

Try it and find out.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Autovacuum / full vacuum (off-topic?)
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Autovacuum / full vacuum (off-topic?)