Re: [HACKERS] SELECT BUG

From: José Soares <jose(at)sferacarta(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] SELECT BUG
Date: 1999-09-07 10:59:24
Message-ID: 37D4F00C.6069FF66@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane ha scritto:

> =?iso-8859-1?Q?Jos=E9?= Soares <jose(at)sferacarta(dot)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(at)hygea ------------ Press CTRL-W for Help
--------
mcode dcode
a1 a1
a13 a13

José

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message José Soares 1999-09-07 12:55:56 Re: [HACKERS] DROP TABLE inside transaction block
Previous Message José Soares 1999-09-07 10:37:17 Re: [HACKERS] SELECT BUG