Re: Wht the SEQ Scan ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Glen Eustace <geustace(at)godzone(dot)net(dot)nz>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Wht the SEQ Scan ?
Date: 2002-09-15 00:20:15
Message-ID: 20020914171825.S74003-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 15 Sep 2002, Glen Eustace wrote:

> I know this is an FAQ, but each case seems to be different. I can not
> understand why the primary index on this table is not used. It was
> specifically created to make this query run quickly.

The one in this case is probably the smallint/bigint problem with
constants being converted to int4 when unquoted.
Try client='10143' or client=CAST(10143 as smallint) in the where
clauses instead of client=10143 and see if that gives you usage of the
index.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glen Eustace 2002-09-15 00:29:47 Re: Wht the SEQ Scan ?
Previous Message Sam Varshavchik 2002-09-15 00:01:42 Re: Recommended technique for large imports?