I am doing some performance testing and have found that SQL seems to be performing much slower on a brand new db than on one which has been around a little while, and I would like to know why this is, and how I can prime my DB a bit better after create so that my performance tests are more accurate.
To show my point I have a test app here which does the following:
- Create database and test table
- Inserts some rows
- Truncates the table
- inserts more rows
2 takes around 1.5x as long as 4
I tried Inu’s note on auto-grow and it looks like this is why the issue occurs.