Creating a database per customer VS single database for all customers (SQL Server)

With so many applications being built as SAAS offerings, an important decision that must be made when defining the data architecture is:  Should each customers’ data be in a separate database, or can a shared database (keyed by a customer identifier) be used for all customers. Pros of database per customer There’s a variety of […]

Read More

What’s filling up tempdb?

If you’ve ever received an alert that tempdb was running out of space, you probably want to know what session/query is consuming tempdb.  There are two ways tempdb gets consumed.  User tempdb usage and system tempdb usage. User temdpb usage is related to creating and populating @table variables or #temporary tables and explicitly populating them. […]

Read More

How to change your default transaction isolation level in SSMS

It’s not uncommon for me to see support professionals running SELECT queries against production databases that cause major performance issues due to shared locks.  By default SQL Server Management Studio (SSMS) has its transaction isolation level set to READ COMMITTED.  If your support users only have read access to your database I would suggest having […]

Read More

Something you should know about query timeouts and sys.dm_exec_query_stats

If you’re looking for your worst performers by querying sys.dm_exec_query_stats, be aware queries that are timing out (i.e. “Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding”) do not factor into the statistics shown in sys.dm_exec_query_stats.  I’ll show an example of this. Example For this example […]

Read More