Re: [GENERAL] 50 MB Table - Mailing list pgsql-general

From JB
Subject Re: [GENERAL] 50 MB Table
Date
Msg-id 38C596E5.8588B319@kw.igs.net
Whole thread Raw
In response to 50 MB Table  (JB <jimbag@kw.igs.net>)
List 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.

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] binary data & LOBs
Next
From: Mona Kaur
Date:
Subject: Postgres question