From: Mark Harrison <mh@pixar.com>
To: Corey Edwards <coreyed@linxtechnologies.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: select is not using index?
Date: Thu, 05 Feb 2004 09:31:24 -0800
Message-ID: <40227DEC.5010007@pixar.com> (raw)
References: <40217853.20309@pixar.com>
<1075936942.12400.18.camel@harvey>
Corey Edwards wrote:
> Your column is a bigint but 123 defaults to type int. Indexes aren't
> used when there's a type mismatch. Use an explicit cast or quote it:
>
> select * from bigtable where id = 123::bigint;
>
> Or
>
> select * from bigtable where id = '123';
Thanks Corey, both of these do exactly what I need...
Cheers,
Mark
--
Mark Harrison
Pixar Animation Studios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mh@pixar.com, coreyed@linxtechnologies.com
Subject: Re: select is not using index?
In-Reply-To: <40227DEC.5010007@pixar.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox