Testing SQL Query Performance

I was asked about how to test a query without all of the clever caching that SQL performs, this is how you do it… but read on for important information. DBCC DROPCLEANBUFFERS DBCC FREEPROCCACHE GO SELECT * FROM MyTable Very Important Notes There are some very important things to consider before you use these commands. […]

Finding Table Sizes in SQL Server

As your database grows, you’ll start becoming highly interested in finding out where your data is. This SQL script grabs a list of tables, with their size (total and used) along with a quick calculation of an average size per row. Just point it at your database and run it to get some numbers out. […]