Home Forums SQL Server 7,2000 Strategies n-hibernate and dynamic sql - DBA vs Developers RE: n-hibernate and dynamic sql - DBA vs Developers

  • A stored procedure is a group of t-sql statements compiled into execution plan.  When you use the stored procedure, the same execution plan will be used and that's why it increases the performance.

    For dynamic SQL, it creates its own execution plan when it runs, that is why it is slower. 

    In my old company, the developers used regular SQL Statement in the C# program and the DBA tried to advised them to use stored procedure because it would run faster.  Guess what!!! No one listens!!!!! 

    Actually some of the logic in the C# program can be put in a stored procedure, however the C# programmers are not sql programmers, all they knew how to write SELECT statement. 

    Two different worlds!!!