Calling SP from within SP

  • I have a very long stored procedure that creates a temptable. To simplify and better organize the code, I access some external stored procedures that inserts rows into the local temptable that was declared in the main procedure. Am I taking a performance hit from doing this? From looking at profiler I am getting a recompile after the external procedures are called. Suggestions?

    TIA,

    John

  • Why use a temp table? Could you not use a perm table? What does the sproc do?

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/

    http://www.dkranch.net

  • As hard as I've tried to eliminate the temptable I have not been successful. Couple of things hinder it:

    1)the joins become so extensive that performance is killed.

    2)sorts on computed fields

    3)size of dataset can vary tremendously

    The application is a web-based keyword search for images... ie show all the images with a keyword of 'dog'.

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

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