Tag Archives: sql-server

Freeing space in SQL Server

When running my local development environment, I frequently need to free up space in SQL Server. How is this done? Firstly, ff there are databases you don’t need, delete them with: ALTER DATABASE your_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE DROP … Continue reading

Posted in SQL Server | Tagged , | Leave a comment

Data migration in SQL Server

Recently I’ve had to write a data migration for SQL Server to split a large table (28 million rows) into separate tables. Some notes here on my thoughts… Firstly, SQL Server has INSERT…SELECT syntax which allows you to copy from … Continue reading

Posted in Databases and SQL, SQL Server | Tagged , | Leave a comment

Finding slow queries in SQL Server

When you want to optimise your app, one of the most important things is to find your slowest database queries, to see if indexes are missing, or the queries should be rewritten. SQL Server stores statistics for its queries in … Continue reading

Posted in Performance, SQL Server | Tagged , | Leave a comment