SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Insert is taking long time.


Insert is taking long time.

Author
Message
Minnu
Minnu
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1327 Visits: 950
hi team,

Insert one records is taking 8 to 1o seconds, indexes,stats every thing is good.
i've rebuild the indexes also,

same table in other environment is taking fraction of second.

any suggestion please...
Ed Wagner
Ed Wagner
SSC-Forever
SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)

Group: General Forum Members
Points: 46651 Visits: 10844
Could you give us a little more to go on? The DDL to create the table and something about the insert that's taking a lot time would be a good place to start.

As a shot in the dark:

What indexes do you have on the table where you're having a problem? If it is over-indexed, that will have an impact on performance.

Do you have any triggers on the table where you're having the problem. These have a significant impact on inserts.


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
HowardW
HowardW
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6097 Visits: 9892
Other things to check:

1) Is it a foreign key column in another table?

2) Is the delete getting blocked
bslchennai
bslchennai
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2513 Visits: 97
Hi,

I am also facing same problem and in my table i have one clustered and two non-clustered index's, two types of triggers INSERT/UPDATE and i don't have foreign keys in the table, but still insert is taking time and due to this i am getting deadlock also.
g_demetriou
g_demetriou
SSC Veteran
SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)

Group: General Forum Members
Points: 282 Visits: 183
bslchennai (6/16/2013)
Hi,

I am also facing same problem and in my table i have one clustered and two non-clustered index's, two types of triggers INSERT/UPDATE and i don't have foreign keys in the table, but still insert is taking time and due to this i am getting deadlock also.



In this scenario, I'd be suspicious of the triggers causing the slowdown. Are they complicated, and do they perform lots of inserts/updates themselves? I tend to use more Merge and Output statements rather than triggers now.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search