temporary tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misogsk
    New Member
    • Jan 2007
    • 39

    temporary tables

    Hi.My procedure include several temporary tables. Will parallel access to this stored procedure cause any problems?
    Thank you
  • almaz
    Recognized Expert New Member
    • Dec 2006
    • 168

    #2
    If you create temporary tables in your stored procedure - there will be no problems. Temporary tables are actually created with unique (dependent upon current session) names.

    Comment

    • felixtfelix
      New Member
      • Jan 2007
      • 1

      #3
      The temporary tables are the tables which will be created in the tempdb of the database. If u have so many temporary tables in the procedure then it will fill the tempdb's allocated space. If the tempdb is full then u may have to restart your system. Moreever if ur using the temporary table and access it paralelly then the tempdb will get locked until the completion of the request of a particular user. So I may cause the performance problem even though it was created with unique id's. It is always suggested to use the table variable like declare @temp table . it will be faster than the tempporary table. This is what i have experienced.

      Comment

      • misogsk
        New Member
        • Jan 2007
        • 39

        #4
        Originally posted by felixtfelix
        The temporary tables are the tables which will be created in the tempdb of the database. If u have so many temporary tables in the procedure then it will fill the tempdb's allocated space. If the tempdb is full then u may have to restart your system. Moreever if ur using the temporary table and access it paralelly then the tempdb will get locked until the completion of the request of a particular user. So I may cause the performance problem even though it was created with unique id's. It is always suggested to use the table variable like declare @temp table . it will be faster than the tempporary table. This is what i have experienced.
        Thank you. I used @temp table.

        Comment

        Working...