Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256

    Red face Unanswered: enabling hash joins

    I am trying to enable hash joins for one of my datamarts, but
    db2set db2_hash_join = on
    does not work.
    I am issuing this command from command line window after connecting to the database so:

    db2> db2set db2_hash_join=on

    What is the correct procedure?
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: enabling hash joins

    Works on mine if I do not have any blanks on either side of '='

    db2set db2_has_join=on

    HTH

    Sathyaram

    Originally posted by blom0344
    I am trying to enable hash joins for one of my datamarts, but
    db2set db2_hash_join = on
    does not work.
    I am issuing this command from command line window after connecting to the database so:

    db2> db2set db2_hash_join=on

    What is the correct procedure?

  3. #3
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    I connected to the database as db2admin and tried:

    DB2SET DB2_HASH_JOIN=ON

    and then

    DB2SET DB2_HASH_JOIN=YES


    in both cases it was judged to be an invalid command line and read as SQL where it expected 'JOIN' after the DB2SET part..............?

    Any idea what I am missing (DB2 7.1 on Windows NT....)
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  4. #4
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186

    Re: enabling hash joins

    Issue the command from the command line, do not do it from the CLP, go to a command prompt, and do the db2set command from there. You must recycle the db after the command is issued, You could also edit the default.env and put in there.

  5. #5
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    Thanks for the reply. I dug up a bit of syntax through:

    http://www7b.boulder.ibm.com/dmdd/li...4adamache.html

    and tried it through command prompt which seemed to work.....
    (like you suggested)

    I tried to get an oversight to check if the change had been made with:

    db2 get dbm cfg (database manager)

    db2 get db cfg for database (database)

    which gave all sorts of information but nothing on hash joins being enabled. I cannot find any *.env file ,so is there another command to get to this parameter information ?
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  6. #6
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186

    Re: enabling hash joins

    type db2set -all at the command line and it will show all the variables that are set

  7. #7
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    thanks a million......
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  8. #8
    Join Date
    Jan 2004
    Posts
    7
    Originally posted by blom0344
    thanks a million......
    ...you can also do:

    from unix command prompt: db2set DB2_HASH_JOIN
    and should see:
    DB2_HASH_JOIN=YES or DB2_HASH_JOIN YES...meaning the db2 registor is set to "on" (YES) in this given example.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •