locked
SQL Server Inserts using NHibernate RRS feed

  • Question

  • Hi everyone.

    I have created a web app with a RESTful API backend sitting in the virtual directory of my web app. 

    It's basically a website, users can login and view their data. The API is used to enter data into the SQL Server Database. 

    The version of the database is 

    Microsoft SQL Azure (RTM) - 12.0.2000.8 
    Dec 16 2015 01:05:50 
    Copyright (c) Microsoft Corporation

    According to a "SELECT @@version" in SSMS 2012. 

    What I am really trying to ask here...is that I do not know why INSERT data into the the database is slow. 

    I have one main API call which is used to enter data into 3 tables. After this is finished, the API call ends and the HttpResponse is sent back. 

    I am now seeing issues here, at any one time I may be calling this API 1000 times. It takes roughly 30 minutes for this to complete. I have diagnosed a bit (I'm saying a bit because I'm a bit new to this whole web development) and it seems like the call to .Save is taking a long time. 

    I'm using the NHibernate ORM to insert data into the database. On the website end, I've used Entity Framework. 

    I do not know why the insert is slow...if it helps most my web app and data center are in the same locality (e.g. they are both in North Central US). 

    Is there any sort of insight anyone can provide here? Thanks. 

    Tuesday, January 19, 2016 11:14 PM

Answers