From: | Greg Maxwell <gmaxwell(at)martin(dot)fl(dot)us> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Stupid database use the index! |
Date: | 2000-08-22 14:01:30 |
Message-ID: | Pine.GSO.3.96.1000822095930.24158E-100000@da1server |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Darrin Ladd | 2000-08-22 14:26:43 | Foreign key to all inherited tables |
Previous Message | Jules Bean | 2000-08-22 12:03:25 | Re: using INTERSECT and UNION in IN clause |