Simple Question of Performance ILIKE or Lower
Simple Question of Performance ILIKE or Lower
От:
Marcos <mjs_ops@gmx.net>
Дата:
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%' Thanks.
Re: Simple Question of Performance ILIKE or Lower
От:
"Jim C. Nasby" <jnasby@pervasive.com>
Дата:
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