Re: [HACKERS] SELECT BUG
От | José Soares |
---|---|
Тема | Re: [HACKERS] SELECT BUG |
Дата | |
Msg-id | 37D4F00C.6069FF66@sferacarta.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] SELECT BUG (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] SELECT BUG
|
Список | pgsql-hackers |
<p>Tom Lane ha scritto: <blockquote type="CITE">José Soares <jose@sferacarta.com> writes: <br />>> When I"explain" this, I see that I am getting a mergejoin plan. <br />>> Are you getting a hash join, perhaps? <p>> Yes.<p>> prova=> explain select mcode, dcode from master m, detail d where <br />> mcode=dcode; <br />> NOTICE: QUERY PLAN: <br />> <br />> Hash Join (cost=156.00 rows=1001 width=24) <br />> -> Seq Scan on detaild (cost=43.00 rows=1000 width=12) <br />> -> Hash (cost=43.00 rows=1000 width=12) <br />> ->Seq Scan on master m (cost=43.00 rows=1000 width=12) <br />> <br />> EXPLAIN <p>OK, do this: <p>update pg_operatorset oprcanhash = 'f' where oid = 1054; <p>and I think you'll be OK. I will put that change into the sources.<p> regards, tom lane <p><tt>************</tt></blockquote><tt>Yes, Tom, now it works, but...</tt><br/><tt>Informix gives me a different result. Who is right ?</tt><br /><tt></tt> <tt></tt><p><tt>prova=> select mcode, dcode from master m, detail d where mcode=dcode;</tt><br /><tt>mcode|dcode</tt><br /><tt>-----+-----</tt><br/><tt>(0 rows)</tt><tt></tt><p><tt>prova=> update pg_operator set oprcanhash = 'f' where oid= 1054;</tt><br /><tt>UPDATE 1</tt><br /><tt>prova=> select mcode, dcode from master m, detail d where mcode=dcode;</tt><br/><tt>mcode |dcode</tt><br /><tt>-----------+----------------</tt><br /><tt>a1 |a1</tt><br/><tt>a13 |a13</tt><br /><tt>a13 |a13</tt><br /><tt>(3 rows)</tt><br /><tt></tt> <tt></tt><p><tt>INFORMIX:</tt><br/><tt>SQL: New Run Modify Use-editor Output Choose Save Info Drop Exit</tt><br /><tt>Run the current SQL statements.</tt><br /><tt>----------------------- hygea@hygea ------------ PressCTRL-W for Help --------</tt><br /><tt>mcode dcode</tt><br /><tt>a1 a1</tt><br /><tt>a13 a13</tt><br /> <p>José<br /> <br />
В списке pgsql-hackers по дате отправления: