Thread

  1. Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer

    Vadim Mikheev <vadim@krs.ru> — 1999-03-18T17:47:34Z

    Bruce Momjian wrote:
    > 
    > > Andriy I Pilipenko wrote:
    > > >
    > > > Why I need to vacuum immediately after creating table?
    > >
    > > Oh, sorry, I missed this -:)
    > > Nevertheless, using index for
    > >
    > > select * from table1 where field1 = 1;
    > >
    > > is bug!
    > 
    > It is possible the new optimizer fixes this.  He needs to try the new
    > snapshot to see.
    
    vac=> create table table1 (field1 int);
    CREATE
    vac=> create index i_table1__field1 on table1 (field1);
    CREATE
    vac=> explain select * from table1 where field1 = 1;
    NOTICE:  QUERY PLAN:
    
    Index Scan using i_table1__field1 on table1  (cost=0.00 size=0 width=4)
    
    Unfixed...
    
    Vadim