Re: Postgres doesn't use indexes for prefix matching?

From: <wespvp(at)syntegra(dot)com>
To: Jon Valvatne <jon(at)valvatne(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres doesn't use indexes for prefix matching?
Date: 2004-07-08 17:30:39
Message-ID: BD12EEEF.EFF7%wespvp@syntegra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your message from 7/2 just showed up today.

> db=# explain analyze SELECT id FROM object WHERE name ~ '^Jon V';

I use leading substring indexing all the time. Try:

SELECT id FROM object WHERE name like 'Jon V%';

Wes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2004-07-08 17:43:56 Re: Postgres doesn't use indexes for prefix matching?
Previous Message wespvp 2004-07-08 17:27:10 Re: enable thready safety on Mac OS X 10.3.4