From: | "Kevin Grittner" <kgrittn(at)mail(dot)com> |
---|---|
To: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>,"Marcel van Pinxteren" <marcel(dot)van(dot)pinxteren(at)gmail(dot)com> |
Cc: | "Alex Hunsaker" <badalex(at)gmail(dot)com>,"Jasen Betts" <jasen(at)xnet(dot)co(dot)nz>,"pgsql-general" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Case insensitive collation |
Date: | 2013-01-21 22:13:34 |
Message-ID: | 20130121221334.120610@gmx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Scott Marlowe wrote:
> Honestly as a lazy DBA I have to say it'd be pretty easy to write a
> script to convert any unique text index into a unique text index with
> a upper() in it. As another poster added, collation ain't free
> either. I'd say you should test it to see. My experience tells me
> that having an upper() (or lower()) index is not a big performance
> hit. If the storage of the index would be too much due to large text
> fields then make it a md5(lower()) index, which WILL cost more CPU
> wise, but allow for > 3k or so of text in a column to be indexed and
> cost less IO wise.
Depending on what sort of search you want to do, it might be dead
simple to use tsearch2 (which is case insensitive) or trigram
indexing (for which a similarity search is case insensitive).
-Kevin
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-01-21 22:15:30 | Re: Running update in chunks? |
Previous Message | patrick keshishian | 2013-01-21 22:07:53 | Re: Running update in chunks? |