• Bhuvnesh (1/2/2013)


    If you go with the basic structure of HASH join then you will find that temp table get created (either in memory or tempdb) which might the cause of tempdb's growth. so now why i mentioned here "either in memory or tempdb" because if data doesnt get fit in memory then it will be moved to tempdb. same happens in case of temp table and table variable storage too(its a myth that table varable get created in memory and temp table in tempdb).

    I think you meant internal work table, aka the hash table. Temp table implies we could address it using #tableName. Internal work tables are created by the database engine to solve a particular query and are not directly addressable by us.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato