Stupid database use the index! - Mailing list pgsql-general

From Greg Maxwell
Subject Stupid database use the index!
Date
Msg-id Pine.GSO.3.96.1000822095930.24158E-100000@da1server
Whole thread Raw
List pgsql-general
Postgres 7.0.2 on linux.

Why is this?

web=# explain select account_nbr from apprsl_accounts where account_nbr =
3315;
NOTICE:  QUERY PLAN:

Seq Scan on apprsl_accounts  (cost=0.00..10317.24 rows=1 width=8)

EXPLAIN
web=# explain select account_nbr from apprsl_accounts where account_nbr =
'3315';
NOTICE:  QUERY PLAN:

Index Scan using apprsl_accounts_account_nbr on apprsl_accounts
(cost=0.00..4.80 rows=1 width=8)

EXPLAIN


--
The comments and opinions expressed herein are those of the author of this
message and may not reflect the policies of the Martin County Board of
County Commissioners.


pgsql-general by date:

Previous
From: Michael Widenius
Date:
Subject: Re: Great Bridge re-runs benchmark with MySQL "tuned"
Next
From: Tom Lane
Date:
Subject: Re: some problems