Re: Select not using primary key index

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Sergio Freue <sfreue(at)yahoo(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Select not using primary key index
Date: 2002-03-14 15:54:47
Message-ID: 20020314075101.D433-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Thu, 14 Mar 2002, Sergio Freue wrote:

> I'm trying to run a simple query on a big (1,500,000 rows) table and I'm
> getting bad performance.
>
> The table I'm using is the minimum necessary to show the problem:
>
>
> create table testBig (id1 smallint not null,id2 smallint not
> null,primary key (id1, id2));

You'll need to either explicitly cast the constants to smallint
or single quote them to get them to match up in type. There've been
past discussions on this in the mailing lists if you want more info.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-03-14 16:00:04 Re: Question about function
Previous Message Doug McNaught 2002-03-14 15:54:06 Re: order by a XML column