pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedSimple Question of Performance ILIKE or Lower
2+ messages / 2 participants
[nested] [flat]
* Simple Question of Performance ILIKE or Lower
@ 2006-01-18 09:10 Marcos <mjs_ops@gmx.net>
0 siblings, 1 reply; 2+ messages in thread
From: Marcos @ 2006-01-18 09:10 UTC (permalink / raw)
To: pgsql-performance
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Simple Question of Performance ILIKE or Lower
@ 2006-01-18 23:02 Jim C. Nasby <jnasby@pervasive.com>
parent: Marcos <mjs_ops@gmx.net>
0 siblings, 0 replies; 2+ messages in thread
From: Jim C. Nasby @ 2006-01-18 23:02 UTC (permalink / raw)
To: Marcos <mjs_ops@gmx.net>; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-01-18 23:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18 09:10 Simple Question of Performance ILIKE or Lower Marcos <mjs_ops@gmx.net>
2006-01-18 23:02 ` Jim C. Nasby <jnasby@pervasive.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox