Skip to content

Tag: tsql

SQL speed up performance of insert?

I am performing some test on sql server and I want to get the best insert speed possible. The statement I use is something like this: INSERT INTO db_Test_databse..tbl_test with(rowlock) ( …

Group by every N records in T-SQL

I have some performance test results on the database, and what I want to do is to group every 1000 records (previously sorted in ascending order by date) and then aggregate results with AVG. I’m actually looking for a standard SQL solution, however any T-SQL specific results are also appreciated. The qu…