![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I was curious about the associated pros and cons between DTS packages, SP's and Jobs (executing T-SQL directly). I am using SQL2000. Basically I prefer building everything into DTS packages, and using the workflow functionality to encourage parallel processing (Have a quad and another oct-processor server) so it can really chew through simultaneous calculations. I have a co-worker who writes stored procedures, calls them in a dts package (one sp per task), and then wants that scheduled. My issues with this is: Why not just write one stored procedure to call them all, and execute that one(no variables are being cast, and it's purely sequential slicing and dicing of data)? Why not have one SQL task within the DTS to execute them in order (instead of task1 then upon completion task2, etc) Also why not just call the stored procedures in the job schedule directly? It's pretty simple stuff, but they are claiming stored procedures are the ultimate. I understand it's a core functionality, but it's a lot of backtracking when I see a job has failed. (I.E. Check the job, then see the dts it runs, then check out the SQL tasks and any logging, followed by opening up the stored procedure listed in each step) Is it all semantics, any "best" practice? BOL states: "SQL Server 2000 and SQL Server version 7.0 incorporate a number of changes to statement processing that extend many of the performance benefits of stored procedures to all SQL statements. SQL Server 2000 and SQL Server 7.0 do not save a partially compiled plan for stored procedures when they are created. A stored procedure is compiled at execution time, like any other Transact-SQL statement. SQL Server 2000 and SQL Server 7.0 retain execution plans for all SQL statements in the procedure cache, not just stored procedure execution plans. The database engine uses an efficient algorithm for comparing new Transact-SQL statements with the Transact-SQL statements of existing execution plans. If the database engine determines that a new Transact-SQL statement matches the Transact-SQL statement of an existing execution plan, it reuses the plan. This reduces the relative performance benefit of precompiling stored procedures by extending execution plan reuse to all SQL statements." Does this mean stored procedures aren't all they are cracked up to be? |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |