Re: [pgsql-advocacy] interesting PHP/MySQL thread
От | Sean Chittenden |
---|---|
Тема | Re: [pgsql-advocacy] interesting PHP/MySQL thread |
Дата | |
Msg-id | 20030623054445.GT97131@perrin.int.nxad.com обсуждение исходный текст |
Ответ на | Re: [pgsql-advocacy] interesting PHP/MySQL thread (nolan@celery.tssi.com) |
Список | pgsql-general |
[ 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
В списке pgsql-general по дате отправления: