| From: | "xuyifeng" <jamexu(at)telekbird(dot)com(dot)cn> |
|---|---|
| To: | <pgsql-hackers(at)postgreSQL(dot)org> |
| Subject: | query plan optimizer bug |
| Date: | 2000-11-22 02:46:49 |
| Message-ID: | 003501c0542e$7903e0e0$4d49823d@xyf |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
it's obviously there is a query plan optimizer bug, if int2 type used in fields,
the plan generator just use sequence scan, it's stupid, i am using PG7.03,
this is my log file:
---------
stock# drop table a;
DROP
stock# create table a(i int2, j int);
CREATE
stock# create unique index idx_a on a(i, j);
CREATE
stock# explain select * from a where i=1 and j=0;
psql:test.sql:4: NOTICE: QUERY PLAN:
Seq Scan on a (cost=0.00..25.00 rows=1 width=6)
EXPLAIN
stock# drop table a;
create table a(i int, j int);
CREATE
stock# create unique index idx_a on a(i, j);
CREATE
stock# explain select * from a where i=1 and j=0;
psql:test.sql:8: NOTICE: QUERY PLAN:
Index Scan using idx_a on a (cost=0.00..2.02 rows=1 width=8)
EXPLAIN
-----------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Don Baccus | 2000-11-22 02:51:07 | Re: query plan optimizer bug |
| Previous Message | Philip Warner | 2000-11-22 01:45:30 | Re: Assert Failure with current CVS |