Thread

  1. Re: [HACKERS] SELECT BUG

    Jose Soares <jose@sferacarta.com> — 1999-09-07T10:59:24Z

    
    Tom Lane ha scritto:
    
    > =?iso-8859-1?Q?Jos=E9?= Soares <jose@sferacarta.com> writes:
    > >> When I "explain" this, I see that I am getting a mergejoin plan.
    > >> Are you getting a hash join, perhaps?
    >
    > > Yes.
    >
    > > prova=> explain select  mcode, dcode from master m, detail d where
    > > mcode=dcode;
    > > NOTICE:  QUERY PLAN:
    > >
    > > Hash Join  (cost=156.00 rows=1001 width=24)
    > >   -> Seq Scan on detail d  (cost=43.00 rows=1000 width=12)
    > >   -> Hash  (cost=43.00 rows=1000 width=12)
    > >       -> Seq Scan on master m  (cost=43.00 rows=1000 width=12)
    > >
    > > EXPLAIN
    >
    > OK, do this:
    >
    > update pg_operator set oprcanhash = 'f' where oid = 1054;
    >
    > and I think you'll be OK.  I will put that change into the sources.
    >
    >                         regards, tom lane
    >
    > ************
    
    Yes, Tom, now it works, but...
    Informix gives me a different result. Who is right ?
    
    
    prova=> select  mcode, dcode from master m, detail d where mcode=dcode;
    mcode|dcode
    -----+-----
    (0 rows)
    
    prova=> update pg_operator set oprcanhash = 'f' where oid = 1054;
    UPDATE 1
    prova=> select  mcode, dcode from master m, detail d where mcode=dcode;
    mcode      |dcode
    -----------+----------------
    a1         |a1
    a13        |a13
    a13        |a13
    (3 rows)
    
    
    INFORMIX:
    SQL:   New  Run  Modify  Use-editor  Output  Choose  Save  Info  Drop
    Exit
    Run the current SQL statements.
    ----------------------- hygea@hygea ------------ Press CTRL-W for Help
    --------
    mcode dcode
    a1    a1
    a13   a13
    
    
    José