From: | JB <jimbag(at)kw(dot)igs(dot)net> |
---|---|
To: | Bruce Bantos <anon(at)mgfairfax(dot)rr(dot)com> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] 50 MB Table |
Date: | 2000-03-07 23:55:17 |
Message-ID: | 38C596E5.8588B319@kw.igs.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I've posted this as a suggestion to the HACKERS list. I'd love to make a
patch but just don't have the time right now to sort through the code.
cheers
jim
Bruce Bantos wrote:
>
> > I've been shuffling thru the 'LIKE' code in pg, but whilst perusing, it
> > occurred to me that I could use a function for this thing. Since i'm
> > only looking at the first part of the string I use...
> >
> > SELECT * FROM info WHERE substring(street_name from 1 to 4) = 'MAIN'
> >
> > ...and the query completes in under 2 secs. Stupidly obvious now but I
> > thought I would share this blinding insight with the list ;)
>
> It was not so obvious to me. I was struggling with the same thing. This is a
> good workaround for the case of "searchstring%". I wonder if the LIKE code
> could be enhanced to perform the query in the same way.
>
--
If everything is coming your way then you're in the wrong lane.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Snow | 2000-03-08 00:01:41 | RE: [GENERAL] 50 MB Table |
Previous Message | Bruce Momjian | 2000-03-07 23:51:10 | Re: [GENERAL] binary data & LOBs |