Original Post
... try { SqlCommand cmd = new SqlCommand(sqlString, connection); cmd.Parameters.AddWithValue("@time", time); cmd.ExecuteNonQuery(); } catch (...){...} ... It was a simple .NET application, a while loop that used a single database connection and did a series of inserts using a SqlCommand object. The application never bloated and the memory for this application remained stable. However, SQL Server 2005 proceeded to allocate up to its memory limit almost immediately. There were about 20,000 inserts made over the course of an hour I think, and even though the database was only 28mb on the disk – SQL allocated 80% of the systems memory, something like 1.5gigs. I was surprised and kind of shocked that a small database made SQL Server allocate so much memory. I do understand that databases should grab as much memory as they can so they can do an efficient job of searching, but isn’t this a little overkill? I’ll post the code if you guys think it’s a problem on my end.