Re: Why is it not using an index?

From: Sergio Freue <sfreue(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org
Subject: Re: Why is it not using an index?
Date: 2002-03-16 00:03:21
Message-ID: 3C928BC9.90305@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

I had the same problem and the question was answered here yesterday:

>
> explain select * from a where x=3;
>

Try

explain select * from a where x=3::smallint;

That should do it. I opted for changing all indexed SMALLINT fields to
INTEGER.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message fcanedo 2002-03-16 00:09:02 Re: [GENERAL] Btree index extension question
Previous Message Dmitry Tkach 2002-03-15 23:41:47 PL/pgSQL question

Browse pgsql-sql by date

  From Date Subject
Next Message fcanedo 2002-03-16 00:09:02 Re: [GENERAL] Btree index extension question
Previous Message Dmitry Tkach 2002-03-15 23:41:47 PL/pgSQL question