Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedures

Status
Not open for further replies.

SQLMeToo

Technical User
Apr 10, 2000
12
0
0
AU
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= home</a><br>
 
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?&nbsp;&nbsp;If so, and the inserts are taking too much time, you might consider an alternative if it meets your business requirements:&nbsp;&nbsp;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= - Visual FoxPro Development</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top