The SQL Server 2016 dynamic data masking feature may seem like a great way to obfuscate data for downstream systems like dev and QA. Joe Obbish shows us that the data can be “unmasked” with T-SQL statements, so it’s not secure against anyone who can write their own queries.… Read more
Temporary tables are used by every DB developer, but they're not likely to be too adventurous with their use, or exploit all their advantages. They can improve your code's performance and maintainability, but can be the source of grief to both developer and DBA if things go wrong and a process grinds away inexorably slowly. We asked Phil for advice, thinking that it would be a simple explanation.… Read more
Views in SQL Server are used to simplify writing queries and managing security, but’s it’s easy for views to eventually get out of sync with the underlying tables. In this article, Edward Pollack shows how to overcome this problem. … Read more
Microsoft introduced several features called Intelligent Query Processing for SQL Server in 2017 and 2019 that can improve performance without making changes to code. In this article, Greg Larsen demonstrates the feature Batch Mode on Rowstore. … Read more
Window functions are useful for solving many SQL queries. In this article, Ed Pollack demonstrates how they can be used to analyse baseball winning streaks.… Read more
T-SQL window functions simplify solving many complex queries. In this article, Edward Pollack demonstrates how the functions can be used to find gaps and islands in a dataset. … Read more
The logic for referential integrity can be implemented in application code, but to make sure that it is enforced, include foreign key constraints in the database design instead. In this article, Joe Celko talks about the history of references in SQL and the options available today. … Read more
There are those who argue that time doesn’t really exist; it’s just an illusion. That debate won’t keep you from storing and manipulating dates and time in SQL Server. In this article, Joe Celko discusses some of the many ways that SQL Server treats temporal data types.… Read more
Temporal tables were introduced with SQL Server 2016. To take advantage of this feature, you might start fresh with a brand new table. It is possible, however, to convert an existing table with accumulated history to the new functionality. In this article, Mala Mahadevan explains how to create temporal tables for both scenarios.… Read more
New releases of SQL Server arrive at a quick pace, and it's difficult to keep up with the many features introduced in each version. In this article, Phil Factor reviews a feature you may have missed, inline indexes. He covers the syntax and the many ways they can be used and then performs some performance tests to see if they can make a difference with table variables.… Read more
T-SQL window functions have been a fantastic addition to the T-SQL language. In this article, Kathi Kellenberger reviews how optimizations available in SQL Server 2019 can improve the performance of these functions.… Read more
You have many options when exporting data from a database. In this article, Phil Factor compares several methods including XML and array-in-array JSON for speed and file size.… Read more
Now that SQL Server 2019 is on the way, it’s time to start learning about the new capabilities. In this article, Greg Larson tests the new APPROX_COUNT_DISTINCT function for performance and accuracy.… Read more
JSON is a viable option for transferring data between systems. It has the ability to include schema information along with the data which is an advantage over CSV files. In this article, Phil Factor demonstrates how he takes advantage of JSON when exporting or importing tables. … Read more
T-SQL window functions, introduced in 2005 with enhancements in 2012, are great additions to the T-SQL language. In this article, Kathi Kellenberger explains what you need to know to get good performance when using these functions.… Read more
T-SQL window functions were introduced in 2005 with more functionality added in 2012. Many database professionals are not aware of these useful functions. In this article, Kathi Kellenberger provides a quick overview of just what a window function is as well as examples of each type of function.… Read more
In-Memory OLTP was introduced with SQL Server 2014 as a way to improve transaction performance. There are several scenarios that are not supported, such as some data types, and Darko Martinović describes the issues and provides workarounds. He also has provided a tool to assist in migrating disk-based tables to In-Memory optimized tables.… Read more
Microsoft introduced native support for JSON in SQL Server in version 2016. In this article, Phil Factor shows how to import JSON documents into to SQL Server database tables, even if there is a bit of complexity in the original data.… Read more