Received: from linux.akadine.com (linux.akadine.com [208.217.232.5]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0BGrWB52078 for ; Fri, 11 Jan 2002 11:53:33 -0500 (EST) (envelope-from john@akadine.com) Received: from db.akadine.com (babel.akadine.com [208.217.232.250]) by linux.akadine.com (8.9.3/8.9.3) with ESMTP id LAA32076; Fri, 11 Jan 2002 11:44:54 -0500 Date: Fri, 11 Jan 2002 11:23:45 -0500 (EST) From: jtp To: Nick Fankhauser cc: pgsql-sql@postgresql.org Subject: Re: Resources In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200201/89 X-Sequence-Number: 6178 On Fri, 11 Jan 2002, Nick Fankhauser wrote: > > > I don't beleive indexes will improve SELECT using LIKE. > > I wondered about that too, so I did a test using a database I'm working > with. The results indicate that it helps substantially- here is my terminal > log file: [snip] an interesting (?) addendum to this. Yes it does help substantially, unless your wildcharacter has characters after it. > staging=# explain select count(*) from actor where actor_full_name like > 'A%'; try: explain select count(*) from actor where actor_full_name like '%a'; not too relevant for searches here, but occasionally it could be. my situation was having a merged last name + zipcode field, instead of having two separately indexed fields. Found out i couldn't do the job i wanted that way.