Temp table performance or explicitly defined table

  • The article below and a follow up post about it kind of go to the heart of the question I have.

    From a performance stance, is it better to create a temp table in memory on the fly or to have a static table to hit when using stored procedures?

    Thanks for any feedback.

    Studdy 

     

    http://www.sqlservercentral.com/columnists/RDyess/temptabl.asp

    Posted 6/2/2006 8:30:00 AM

    Valued Member

    Over 50 Posts

    Valued Member<br>Over 50 Posts</p><p>

    Group: General Forum Members

    Posts: #54

    Currently: Offline

    I have a related question:

    In a stored procedure, is it better to create and later drop a "normal" table, instead of using a temp table?

    -- Stephen Cook

  • If you are planning to drop the table used in a stored procedure temp tables are your friend


    * Noel

  • Yes temp table. But suggest to properly index them on creation so that they does not hit your query performance.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply