One big call vs. multiple smaller TSQL calls
        Posted  
        
            by BrokeMyLegBiking
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by BrokeMyLegBiking
        
        
        
        Published on 2010-03-23T15:22:24Z
        Indexed on 
            2010/03/23
            15:23 UTC
        
        
        Read the original article
        Hit count: 292
        
tsql
I have a ADO.NET/TSQL performance question. We have two options in our application:
1) One big database call with multiple result sets, then in code step through each result set and populate my objects. This results in one round trip to the database.
2) Multiple small database calls.
There is much more code reuse with Option 2 which is an advantage of that option. But I would like to get some input on what the performance cost is. Are two small round trips twice as slow as one big round trip to the database, or is it just a small, say 10% performance loss? We are using C# 3.5 and Sql Server 2008 with stored procedures and ADO.NET.
© Stack Overflow or respective owner