Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer
Date
Msg-id 199903181900.OAA05914@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer  (Vadim Mikheev <vadim@krs.ru>)
List pgsql-hackers
> Bruce Momjian wrote:
> > 
> > My guess is that the creation of the index updates the table size
> > statistics.
> 
> Yes.
> 
> > However, when I see zero size, I don't know if it is accurate, or if
> > someone has added rows since the last vacuum/index creation, so I think
> > it is correct to use an index on a zero-length table if it is
> > appropriate.  If the size is 1, I will assume that number is accurate,
> > and do a sequential scan.
> > 
> > Does that make sense?
> 
> Yes. But we have to fix SeqScan for field1 = -1...

Woh, I just tried it myself, and was able to reproduce it.  I will check
into it now.  Gee, that is very strange.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer
Next
From: Terry Mackintosh
Date:
Subject: Re: [HACKERS] Re: Developers Globe (FINAL) (fwd)