We have a large database with stored procedures which run<br>on data insert - these procedures disperse the data and<br>calculate averages. The sp are quite lengthly - is it better<br>to split these sp's into small parts?
As far as I know, it shouldn't make much difference. <br><br>When you run a stored procedure for the first time a copy of the code is cached. Any subsequent calls to the sp will be run by the cached image (which is one of the reasons it works faster than sending the code from the front-end each time).<br><br>Splitting into seperate sps may make the code easier to read I suppose. <p> <br><a href=mailto: > </a><br><a href=
SQLMeToo wrote:<br><i>stored procedures which run on data insert</i><br><br>That implies that these SPs are invoked from an Insert trigger...yes? If so, and the inserts are taking too much time, you might consider an alternative if it meets your business requirements: scheduling a stored procedure to run at night that does the dispersing and calculations. <p>Robert Bradley<br><a href=mailto: > </a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.