From: Tom Lane <tgl@sss.pgh.pa.us>
To: Palle Girgensohn <girgen@pingpong.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: LIKE should use index when condition doesn't include wildcard
Date: Tue, 30 Mar 2004 19:16:44 -0500
Message-ID: <26840.1080692204@sss.pgh.pa.us> (raw)
In-Reply-To: <145170000.1080688008@palle.girgensohn.se>
References: <145170000.1080688008@palle.girgensohn.se>
Palle Girgensohn <girgen@pingpong.net> writes:
> Shouldn't the optimizer use indices if the like condition does not have any
> wildcards?
I can't get excited about this; if you are depending on LIKE to be fast
then you should have locale-insensitive indexes in place to support it.
Switching the tests around so that this special case is supported even
with an index that doesn't otherwise support LIKE would complicate the
code unduly IMHO, to support a rather pointless corner case...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, girgen@pingpong.net
Subject: Re: LIKE should use index when condition doesn't include wildcard
In-Reply-To: <26840.1080692204@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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