Is there a way to monitor the network traffic - Dynamic SQL vs Stored procedures

  • Dear All

    There are lots of opinions and debate regarding the following topic.

    Performance under executing the dynamic SQL vs stored procedures.

    Personally, I like stored procedures. So I am curious about how we can prove that using stored procedure is the best choice for performance.

    When we pass the huge SQL over on the network, it is going to cause the network traffic.

    Is there any to monitor the network traffic (how much data transferred over on the network (kb)) for the particular SQL select or any DB transactions?

    Thanking you

    Marimuthu Sakthivel

  • 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

  • Dear Kevin

    Thanks for your reply and I got your point.

    Thanking you

    Marimuthu Sakthivel

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply