none
Slower SQL access under .NET 2.0 than 1.1 RRS feed

  • Question

  •  

    Hi.

    I've got what I would consider a fairly standard 3-tier app, whereby ASP.NET calls a web service to obtain a dataset that is then used to fill a grid. The web service uses sql adapter to retrieve the data from a SQL2000 database to fill the dataset. Stored procedures are being used to retrieve the data.

     

    The web service uses a very standard sequence to retrieve the data:

    1. Set SQLCommand (which was created visually at design time) parameters according to params passed to the web service by the calling app.
    2. Create a SQLDataAdapter from that SQLCommand
    3. Use adapt.Fill() to fill the dataset
    4. close and dispose of data access objects
    5. return the dataset

    This model had worked perfectly under .NET 1.1, then I did two major changes at once:

    1. I moved somce web services to .NET 2.0 (ASP.NET remained as 1.1, and some web services as well)
    2. I moved the database from the local IIS server to anoter server (a SQL cluster) in the same LAN

    Since those two changes it seems like the response (from the time I press submit to the time I see the grid populated in the browser) has become quite a bit slower, and it seems like database timeouts happen a lot more frequently. However this only seems to affect the .NET 2.0 web services, while those still running under 1.1 don't seem to be suffering from the same problems.

     

    Besides the obvious impact that having the data traversing the LAN instead of being all local, is there any technical reason for .NET 2.0 to be affected by SQL access delays than 1.1? Did the SQL data access objects that existed in .NET 1.1 become less efficient in 2.0?

     

    I know that 2.0 offers some new functionality that I could use to make my apps more efficient and to fine-tune their performance, however for now I'm comparing two apps (web services) which are pretty much identical except that one is .NET 1.1 and the other 2.0. So unless the old functions are known to be slower under 2.0, I'm not after suggestions to improve performance by redesigning my app, but for a feasible explanation of the possible cause.

     

    Two more details you may need to know to give an opinion:

    1. I'm using SQL authentication, and I would prefer to continue doing so
    2. I used the upgrade wizard to move the  web service from 1.1 to 2.0, I didn't start from scratch. 

    Thanks in advance for any ideas/suggestions

     

    Pedro
    Friday, October 26, 2007 4:52 AM