| From: | jtp <john(at)akadine(dot)com> |
|---|---|
| To: | Nick Fankhauser <nickf(at)ontko(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Resources |
| Date: | 2002-01-11 16:23:45 |
| Message-ID: | Pine.BSF.4.21.0201111115590.6416-100000@db.akadine.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Frank Bax | 2002-01-11 16:27:58 | Re: Resources |
| Previous Message | Nick Fankhauser | 2002-01-11 16:13:58 | Re: Resources |