From: | The Hermit Hacker <scrappy(at)hub(dot)org> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Vadim Mikheev <vadim(at)krs(dot)ru>, bamby(at)marka(dot)net(dot)ua, hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer |
Date: | 1999-03-19 13:32:16 |
Message-ID: | Pine.BSF.4.05.9903190931400.4027-100000@thelab.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Thu, 18 Mar 1999, Bruce Momjian wrote:
> > Bruce Momjian wrote:
> > >
> > > Let me tell you why I don't think this is a bug. The optimizer will
> > > choose ordered results over unordered results if the costs are the same.
> > > In this case, the cost of the query is zero, so it chose to use the
> > > index because the index produces an ordered result.
> > >
> > > This works well for un-vacuumed tables, because it thinks everything is
> > > zero cost, and chooses the index.
> >
> > Agreed, this is ok as long as
> >
> > vac=> create table table1 (field1 int);
> > CREATE
> > vac=> insert into table1 values (1);
> > INSERT 1583349 1
> > vac=> create index i_table1__field1 on table1 (field1);
> > CREATE
> > vac=> explain select * from table1 where field1 = 1;
> > NOTICE: QUERY PLAN:
> >
> > Seq Scan on table1 (cost=1.03 size=1 width=4)
> >
> > - SeqScan is used for small tables.
> >
> > So, only bug reported is left.
> >
>
> Can you get on IRC now? Why are you up so late?
That's something we need on our globe...timezones :)
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org
From | Date | Subject | |
---|---|---|---|
Next Message | Unprivileged user | 1999-03-19 13:34:07 | General Bug Report: ECPG does not process Fetch |
Previous Message | Bruce Momjian | 1999-03-18 21:33:11 | Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer |
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-03-19 13:40:59 | Re: [HACKERS] Removing derived files from CVS |
Previous Message | Oleg Broytmann | 1999-03-19 09:36:32 | Re: [HACKERS] 6.5 Feature list and summary |