Re: SELECT speed with LIKE

From: Frank Bax <fbax(at)execulink(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT speed with LIKE
Date: 2000-04-02 23:24:03
Message-ID: 3.0.6.32.20000402192403.0096b5f0@execulink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 01:33 PM 4/01/00 -0500, you wrote:
>The table has a field called 'stname char(17)' which is indexed. The
>query is "SELECT * FROM data WHERE stname LIKE 'MAIN%'". I'm running on
>Redhat 6.1, 128MB ram, 40GB, P350. The actual index file is 4 MB.

I haven't tried it, but didn't someone mention a few weeks ago that "WHERE
stname ~ '^MAIN'" would produce the same results faster?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff MacDonald 2000-04-03 03:17:51 sql92
Previous Message brew 2000-04-02 21:23:46 Re: SELECT speed with LIKE