From: | gherzig(at)fmed(dot)uba(dot)ar |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: best index for ~ ordering? |
Date: | 2007-03-07 03:28:57 |
Message-ID: | 22296.190.55.118.199.1173238137.squirrel@www.webmail.fmed.uba.ar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Well, im wondering if is possible using LIKE '%blah%', even better would be
upper/lower(string) like '%blah%',
Im not at work right now, i will try it latter and makes you know about
the results of using tsearch indexing.
Thanks a lot, man!
Gerardo
> On Tue, Mar 06, 2007 at 06:34:23PM -0300, Gerardo Herzig wrote:
>> Hi all, i have a large table with one varchar field, and im triyng to
>> get information about what index should i use in order to using that
>> index (if this is possible) for ~ searching, and/or using LIKE
>> searching.
>
> What sort of match are you doing? If you're doing left-anchored
> searches (LIKE 'blah%') then your standard btree is good. If you're
> doing unanchored searches (LIKE '%blah%' or similar) you're best doing
> tsearch. If it's right-anchored, you can do an index on the reverse
> of the string.
>
> A
>
> --
> Andrew Sullivan | ajs(at)crankycanuck(dot)ca
> Unfortunately reformatting the Internet is a little more painful
> than reformatting your hard drive when it gets out of whack.
> --Scott Morris
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
--
Gerardo Herzig
Direccion General de Organizacion y Sistemas
Facultad de Medicina
U.B.A.
From | Date | Subject | |
---|---|---|---|
Next Message | Shavonne Marietta Wijesinghe | 2007-03-07 11:35:58 | PRIMARY KEY |
Previous Message | calendarw | 2007-03-07 01:16:43 | Re: How to union table without union statement? |