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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Hash join not being used

RE: Hash join not being used

From: Gaja Krishna Vaidyanatha <gajav_at_yahoo.com>
Date: Mon, 26 Jun 2000 09:35:12 -0700 (PDT)
Message-Id: <10540.110439@fatcity.com>


Dan,

I have outlined some scenarios when the optimizer may quit using hash joins as the join method. Please let us know if any of these are applicable. Also, I am assuming that you have not upgraded your version of Oracle and/or changed anything significant since your last run of the query.

Events that might cause the behavior change:

  1. Significant reduction of values of hash_area_size and/or hash_multiblock_io_count.
  2. If running 7.3.x, 733_PLANS_ENABLED is set to FALSE.
  3. HASH_JOIN_ENABLED is set to FALSE
  4. OPTIMIZER_INDEX_CACHING is set to a high value say 99.
  5. Change in the amount of data and/or the distribution of data in the tables, which makes the optimizer re-think its "hash join" strategy -- unlikely, but just threw that in, just in case.

All of the aforementioned parameters can be set/changed at the session level. On the flip side, if you set a high value for HASH_AREA_SIZE (e.g. 100 Mb.) and HASH_MULTIBLOCK_IO_COUNT (same value as DB_FILE_MULTIBLOCK_READ_COUNT), set HASH_JOIN_ENABLED to TRUE, and OPTIMIZER_INDEX_CACHING to 0 (default) at the session level, you will encourage the optimizer to use hash joins over nested loops. Normally, if you have all of the aforementioned parameters set to the recommended values, you will not need a hint to force the optmizer to use hash joins. It just will do it automatically, but your mileage may vary, based on some other factors.

Hope that helps,

Gaja.


Gaja Krishna Vaidyanatha | gajav_at_yahoo.com Brio Technology | (972)-304-1170

"Opinions and views expressed are my own and not of Brio Technology" Received on Mon Jun 26 2000 - 11:35:12 CDT

Original text of this message

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