MS SQL please speed up so i dont cry
October 20, 2009 9:07 AM
Subscribe
MS SQL Pros, I need your help! What's causing MS SQL 2005 to import records so slowly? It's a persistent problem across all databases that just developed yesterday. Details inside...
So my 3rd party app that I use to import records into MS SQL 2005 Standard has gone from approximately 10K records per hour to 500 records per hour. I've tried creating new databases to test on, and they all give me the same result.
I'm no MS SQL expert, but I did a bit of googling and created a trace file. It looks like the delay (according to the Start and End Time in the trace record) is between an "IF @@TRANCOUNT > 0 COMMIT TRAN" and "SELECT ID FROM tlbFolders WHERE NAME="C:\PATHTODATA\". The delay between these 2 events is about 10 seconds, and I can't tell why it's acting so slow.
I'll follow up in the thread, let me know if you need more info or know of any additional resources that can help me answer this question, or any good troubleshooting tips. Thanks!
posted by antonymous to computers & internet (9 comments total)
SELECT ID FROM tlbFolders WHERE NAME="C:\PATHTODATA\"
First of all, I hope [NAME] isn't the actual column name! Second, you're matching on a text field, which is extremely inefficient and if not indexed can get slow if that table gets large. Is tblFolders the table you're inserting into? If so, that would explain a lot.
posted by mkultra at 9:35 AM on October 20