Re: Lack of use of indexes

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Don Isgitt <djisgitt(at)soundenergy(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Lack of use of indexes
Date: 2002-11-22 15:40:28
Message-ID: m3hee9hatv.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Don Isgitt <djisgitt(at)soundenergy(dot)com> writes:

> Hello.
>
> I have a question regarding the lack of use of indexes on a table; I
> have included what I hope is all the relevant information. Your help
> is appreciated.

Use "varchar" or "text" instead of "character" for your column types
and it should work. IIRC, "character" is treated slightly differently
from other text types in the query optimizer, and string constants
default to type "text".

As far as why the integer index isn't being used, I'm not sure. Does
it use the index if you change the WHERE clase to " section = '14' "?

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-11-22 15:48:39 Re: Lack of use of indexes
Previous Message Scott Lamb 2002-11-22 15:39:16 Re: View and primary key