0

I am having an interesting problem with mygeneration doodad objects. I am using doodad stored procedures to enter about 25K records reading from a file to my SQL Server database. I need to fill up 5 tables. Every time I ran the C# program calling doodads, I found that first 8K records are entered within 1-2 minutes, whereas the rest 16K is taking hours. It is driving me crazy, but I don't know a way out. Anybody can help?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Masud Rahman
  • 1,064
  • 4
  • 14
  • 28

1 Answers1

0

Do you have access to the SQL Server Client tools? If so, and you can run SQL Profiler, you can see what statements are being executed against the SQL Server, and their frequency. From here, you can watch the throughput against the server, and you can see if the requests themselves are slowing down (time between ends and begins is increasing), or if they're just taking longer and longer to execute (time between begins and ends is increasing).

Also, you say the first 8K records are pretty quick, and the rest (17K or so) are really slow. Does performance degrade over time (each 1K is slower than the 1K before it), or does performance get slower and then hold steady? If performance steadily degrades, you might be seeing either a memory leak or an issue with your data layout - if you execute the program multiple times, or with data already in the tables, what happens? If putting other data in the tables and then running your inserts gives you the same performance situation, then I'd look at the application. If pre-populating the data immediately drops performance to unacceptable levels, then maybe your database needs some indexing, or there's a storage issue.

SqlRyan
  • 33,116
  • 33
  • 114
  • 199