Home Forums Programming General Running Multiple instance of the same stored procedure RE: Running Multiple instance of the same stored procedure

  • loki1049 (6/14/2010)


    The whole process is a lot more complicated then I have explained. 3 mins seems quite reasonable for what it actually does in the end.

    Does any of that code contain the word "WHILE"? Is so, I bet there are several people out here that can make it appreciable faster!

    I do have a question about the code you supplied. Specifically this part:

    IF OBJECT_ID('tempdb..#AreaReadings') IS NULL CREATE TABLE #AreaReadings(col1 int)

    So back to the main question, what happens if the temp table #AreaReadings is being used by one instance of the stored procedure while another instance tries to start and create it again, does it just give an error?

    See what Gail said. Also, take a look at this article[/url].

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2