
We all have written queries that use COUNT DISTINCT to get the unique number of non-NULL values from a table. This process can generate a noticeable performance hit especially for larger tables with millions of rows. Many times, there is no way around this. To help mitigate this overhead SQL Server 2019 introduces us to approximating the distinct count with the new APPROX_COUNT_DISTINCT function.

Static Data Masking in SSMS 18.0 Preview enhances data security by obscuring sensitive information in databases. It safeguards privacy during testing by replacing real data with masked values, ensuring confidentiality and compliance with data protection regulations.

SQL Server Vulnerability Assessment (VA) in SQL Server Management Studio 17.4 or later lets SQL Server scan your databases for potential security vulnerabilities and can be run against SQL Server 2012 or higher. If you are not on a newer version on SSMS.

SQL Data Discovery and Classification in SSMS allows users to identify and categorize sensitive data within databases, aiding in compliance with regulations like GDPR. Enhance data security and governance by classifying data based on sensitivity levels directly within SQL Server Management Studio.

Learn how SQL Server 2019 resumable online index creation lets you pause and resume index builds, manage maintenance windows, and control transaction log growth.

Did you know that compression can gain you more than just space on a disk; it can allow you to fit more data into the buffer pool? That means queries have faster and more efficient reads which can help reduce I/O.

Statistics are the magic ingredient that helps the query optimizer create its best guess for generating an execution plan. Keeping statistics as accurate as possible will give the optimizer the information it uses to calculate estimated costs and cardinality, which enables it to properly allocate resources such as memory grants.
All speakers had to give their very first session once. We all had to bite the bullet and face the fear of no one wanting to hear us talk, what if I teach something wrong, or what if I throw up because I am too nervous? We’ve all been there. You’re not alone in your journey of becoming a speaker.

Explore the built-in SQL Server Data Collection tool for system monitoring. Learn setup steps for Management Data Warehouse, access control via roles, and monitoring data collection using SQL Agent and SSIS. Access reports for insights.

I saw this again recently and see it too often in environments so wanted to take a second to remind everyone to cycle their error logs on a regular basis. SQL Server keeps error logs and when you reboot or restart SQL Server services the logs are cycled and a new one is created.

Quite often, I see database administrators set SQL Server Max Server Memory thinking that only everything related to SQL Server uses this shared memory pool. This is a mistake. There are many things that rely on memory that are not part of SQL Server. Best practices state that you should leave memory allotted for the operating system.

SQL Server offers backup encryption to enhance data security. Utilize encryption algorithms and key management to protect database backups, ensuring compliance with privacy regulations and safeguarding sensitive information from unauthorized access.

Microsoft has long given us DBA tools and suggestions to help tune databases, to fix queries with indexes, and many times they were of questionable merit. We have all seen the dreaded dta_index names in a database and rolled our eyes knowing that sometimes these indexes are not what is needed.

Optimize Azure SQL Database costs by leveraging pricing tiers, reserved capacity, and performance tuning. Monitor resource utilization, scale efficiently, and implement cost-effective strategies to save money on your monthly bill.

Starting in SQL Server 2012 and in Azure SQL Database, Microsoft introduced the concept of a contained database. A contained database is a database that is completely un-reliant on the instance of SQL Server that hosts the database including the master database--theoretically.
I typically don’t write opinion posts,but given recent events I thought it was important to follow up on one of my tweets. Last week, I tweeted about Stack Exchange and my thoughts on the lack of respect in the responses to those who take the time ask questions in forums.

Ensure smooth replication of maximum text length in SQL Server by configuring 'max text repl size' using sp_configure. Optimize data management and maintain database performance with appropriate configuration settings.

Learn how SQL Server Secure Enclaves improve Always Encrypted by enabling operations such as comparisons, sorting, aggregations, and searches on protected data.
Following up on my last post about the Cardinality Estimator let’s talk about column statistics and how they work and play a part in execution plans. The cardinality estimator relies heavily on statistics to get the answer to selectivity (the ratio of distinct values to the total number of values) questions and calculate a cost estimate.
Database administrators have enormous responsibility whether they manage one or hundreds of servers. Monica Rathbun tells us how she survived as the Lone DBA for 56 database servers for over a decade. While many DBAs work on teams instead of alone, she has great advice for all.
"Quick Model Database Tidbit" refers to a concise and brief piece of information or knowledge about the "model" database in the context of a database management system like Microsoft SQL Server. This tidbit could cover various aspects of the "model" database, such as its purpose, characteristics, role in database creation, default settings, or any notable features. It's a snippet of information that provides a snapshot of key details about the "model" database in a short and easily digestible format.

In SQL Server, the query optimizer uses a cardinality estimator to answer data SELECTIVITY questions like the ones below. The optimizer uses this cardinality data, which relies heavy on statistics to get the answers and calculate a cost estimate. It takes the #of Rows to Satisfy a Predicate/Total # of Input Rows.

When applying a new SQL Server cumulative update, hot fix, or upgrade to SQL Server, it doesn’t always apply all the fixes in the patch. When you upgrade the database engine in-place, databases you already had stay at their pre-upgrade compatibility level, which means they run under the older set of optimizer rules.
Today I ran into something on a client-server that unfortunately I see too often. The DBA goes through the trouble of configuring and setting up alerts/operators but doesn’t really understand what the options in the configurations mean. So, unfortunately, that means they take the CYA (cover your ass) approach and they check all of them. Now, not only have I seen this with alerts but also with things like security configurations as well. My advice is to always take a second and research what each option is before you check the little boxes, especially when it comes to security. Always follow the rule of less is more.

Learn how SQL Server system-versioned temporal tables retain row history for auditing and point-in-time analysis, including table creation and FOR SYSTEM_TIME queries.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article