Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How much space is used on Hash join?

How much space is used on Hash join?

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 28 Mar 2002 21:19:10 -0600
Message-ID: <un0wruc43.fsf@rcn.com>


Suppose:

create table t1 (id1,id2,id3,fld1,fld2,fld3); create table t2 (id1,id4,fld4,fld5,fld6,fld7);

I need to query both tables fully.

SELECT /*+ use_hash(t1) */

       t1.fld1, t2.fld4
FROM t1,t2
WHERE t1.id1=t2.id1;

Does Oracle need HASH space for all the columns in both tables or does it need space for only those columns referenced in the query?

It reads an entire table block by block, but as it is picking off the rows from the block it just read and is creating the hash key, does it lose the uneeded columns as well, or does it create a hash key that references the entire block somehow?

This question could be asked of sort-merge joins as well. I hope it was clear.

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Thu Mar 28 2002 - 21:19:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US