Home Forums SQL Server 2012 SQL 2012 - General Is there a way to monitor the network traffic - Dynamic SQL vs Stored procedures RE: Is there a way to monitor the network traffic - Dynamic SQL vs Stored procedures

  • The network traffic caused by sending in dynamic sql statements should not be anything to worry about. If it is, then you must still be running on 10 megabit ethernet!

    As long as you guard against SQL Injection, dynamic SQL can provide AMAZING performance INCREASES in cases where you have data value skew, widely-varying input parameters, open-ended search, paging, etc. It is a tool I go to regularly with clients.

    On the other hand sprocs can be a boon when you don't have the above issues and/or are seeing compilation waits (which is a true rarity in my experience).

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service