Re: Simple Question of Performance ILIKE or Lower

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux