Enable backup compression by default?
The SQL community was really pleased when Microsoft listened to everyone’s feedback and made backup compression available in Standard Edition of SQL Server 2008 R2 (it was only available in Enterprise...
View ArticleHow to prevent table scans when searching LOB data?
If a SELECT has the LOB column in the WHERE clause then the query plan will involve a table scan – as you cannot create a nonclustered index over a LOB column. SQL Server Questions Answeredread more
View ArticleIs my master database really corrupt?
It’s becoming increasingly common these days for DBAs to want to offload consistency checking of production databases to a secondary server, so that the heavy resource usage associated with running...
View ArticlePhysical ordering of records in an index
Learn how how Microsoft SQL Server maintains the ordering of record storage in indexes including at what point the records get moved around on the index pages so that they're stored in the correct...
View ArticleCurious Case of the missing SOS_SCHEDULER_YIELD waits
Many of the monitoring scripts/tools for looking at wait statistics aggregate all the wait statistics and return the top 95% of all waits occurring, sorted by most prevalent waits by total wait time....
View ArticleSUSPECT vs. RECOVERY_PENDING
From SQL Server 2005 onwards (when the metadata subsystem inside SQL Server was extensively rewritten), the database management portion of the Storage Engine has surfaced a variety of new states in...
View ArticleDo log records ever move in the transaction log?
Why is it that sometimes when I try to shrink a transaction log file, the shrink fails? Why can’t SQL Server just move log records to the start of the transaction log? SQL Server Questions...
View ArticleWhy do TRUNCATE and DROP TABLE complete so fast?
In SQL Server 2000 SP3 the deferred drop mechanism was introduced. This works by unhooking the allocations for a table and placing them on the deferred drop queue. SQL Server Questions Answeredread more
View ArticleHow record DELETEs can cause index fragmentation
Record deletion can indeed cause fragmentation. There are two kinds of fragmentation described by SQL Server Books Online: logical fragmentation and low page density. SQL Server Questions Answeredread...
View ArticleBeware of trying to upgrade a database with a read-only filegroup
Upgrade does not work with read-only filegroups. If you try to take a SQL Server 2008 R2 database with a read-only filegroup and attach it to SQL Server 2012, you’ll see errors. SQL Server Questions...
View ArticleAltering execution priority using Resource Governor
Most people know that Resource Governor allows you to specify CPU and memory limits when contention for these resources occurs, but it’s a little-known fact that you can configure relative priorities...
View ArticleFiltering out benign waits
The simple answer is that not all waits need to be analyzed when doing performance troubleshooting. SQL Server Questions Answeredread more
View ArticleLocking and DBCC CHECKDB
From SQL Server 2000 onwards, DBCC CHECKDB runs online by default. Even in SQL Server 2000 though, DBCC CHECKDB still took Schema-Stability locks on tables that were being checked as it could not cope...
View ArticleAvoiding logging for user operations
Question: I'd like to be able to speed up operations as much as possible by turning off transaction logging completely, but there does not seem to be a way to do it. Why does SQL Server insist on...
View ArticleIs the recovery interval guaranteed?
Question: SQL Server has a one minute recovery interval for all databases and I’ve read the SQL Server guarantees that the databases can always be brought online after a crash within one minute. Can...
View ArticleRecovering a database with a missing transaction log
Usually when a database has open transactions and the server crashes, crash recovery will run on the affected database and roll back the open transactions. SQL Server Questions Answeredread more
View ArticleHow to prevent table scans when searching LOB data?
If a SELECT has the LOB column in the WHERE clause then the query plan will involve a table scan – as you cannot create a nonclustered index over a LOB column.SQL Server Questions Answeredread more
View ArticleIs my master database really corrupt?
It’s becoming increasingly common these days for DBAs to want to offload consistency checking of production databases to a secondary server, so that the heavy resource usage associated with running...
View ArticlePhysical ordering of records in an index
Learn how how Microsoft SQL Server maintains the ordering of record storage in indexes including at what point the records get moved around on the index pages so that they're stored in the correct...
View ArticleCurious Case of the missing SOS_SCHEDULER_YIELD waits
Many of the monitoring scripts/tools for looking at wait statistics aggregate all the wait statistics and return the top 95% of all waits occurring, sorted by most prevalent waits by total wait...
View Article