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 -> Re: HASH vs NESTED LOOP join: when is one better than the other ?

Re: HASH vs NESTED LOOP join: when is one better than the other ?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 22 Mar 2006 09:33:41 -0800
Message-ID: <1143048821.660817.261460@g10g2000cwb.googlegroups.com>


To add what hpuxac said I believe the optimizer will also look at how many of the table blocks it expects to have to visit. Even with good selectivity if the data is not clustered the rdbms could have to read nearly every block in the table to get one row from each block. Reading all the blocks sequentially using the multi_block_read_count could take less work than reading each block via the index so a hash join could appear to be a better choice than a nested loop join.

HTH -- Mark D Powell -- Received on Wed Mar 22 2006 - 11:33:41 CST

Original text of this message

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