From: Sean Chittenden <sean@chittenden.org>
To: nolan@celery.tssi.com
Cc: Advocacy PostgreSQL <pgsql-advocacy@postgresql.org>
Cc: PostgreSQL-general <pgsql-general@postgresql.org>
Subject: Re: [GENERAL] interesting PHP/MySQL thread
Date: Sun, 22 Jun 2003 22:44:45 -0700
Message-ID: <20030623054445.GT97131@perrin.int.nxad.com> (raw)
In-Reply-To: <20030623053352.1457.qmail@celery.tssi.com>
References: <20030623015333.E95856@hub.org>
<20030623053352.1457.qmail@celery.tssi.com>
[ Please stop cross posting emails between mailing lists! ]
> > > Personally, if I want case insensitivity, I'll WRITE IT INTO THE CODE,
> > > but I can see how some people might think that 'NOLAN', 'Nolan' and
> > > 'nolan' should be considered as the same data.
> >
> > Oh, you mean like "SELECT * FROM table WHERE field ~* 'nolan';"?
>
> No, I mean as in "SELECT * FROM table WHERE field = 'nolan';"
CREATE INDEX table_field_lower_idx ON table (LOWER(field));
VACUUM ANALYZE table;
SELECT * FROM table WHERE LOWER(field) = LOWER('nolan');
SELECT * FROM table WHERE field ILIKE 'nolan%';
ILIKE is case insensitive LIKE.
http://developer.postgresql.org/docs/postgres/functions-matching.html#FUNCTIONS-LIKE
This is likely an FAQ for new MySQL users at this point, or should be
if it's not.
If you are still having performance problems with the above solutions,
please send an EXPLAIN ANALYZE to the performance@ list so we can
figure out what's going on. -sc
--
Sean Chittenden
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-docs@postgresql.org
Cc: sean@chittenden.org, nolan@celery.tssi.com, pgsql-advocacy@postgresql.org, pgsql-general@postgresql.org
Subject: Re: [GENERAL] interesting PHP/MySQL thread
In-Reply-To: <20030623054445.GT97131@perrin.int.nxad.com>
* 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