Skip site navigation (1) Skip section navigation (2)

Re: how to speed ilike

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <julius(at)nsoft(dot)lt>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: how to speed ilike
Date: 2010-01-25 13:18:43
Message-ID: 4B5D45D3020000250002EB4A@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
Julius Tuskenis  wrote:
 
> I've made a function that converts lithuanian letters to latin and
> use it like fnk_latin(username) ILIKE fnk_latin('kestas').
 
> Now the problem is performance.
 
> Maybe some special index would help?
 
create index tblname_username_latin on tblname
((fnk_latin(username)));
 
You might want to have that function force all letters to lowercase. 
It might also help to specify varchar_pattern_ops.

-Kevin

Responses

pgsql-admin by date

Next:From: Kevin GrittnerDate: 2010-01-25 13:24:54
Subject: Re: max_fsm_pages question
Previous:From: Julius TuskenisDate: 2010-01-25 12:23:09
Subject: how to speed ilike

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group