Posts

Showing posts from January, 2024

Improve SQL Server Query Performance with Searchable Arguments

Image
  Problem My SQL Server query is running slowly. The WHERE clause is comparing against a column that is indexed, but the SQL query isn't doing an index seek. It sure seems like it shouldn't be scanning. Why might that be? Solution This is a common problem, especially for newer TSQL developers that are less familiar with the inner working of the SQL Server query engine. This tip will look at 2 different queries where indexes aren't used by the optimizer, but could be if the query was tweaked. Next, it will explain why this small coding change will work. Finally, we will perform the tweak to see what sort of performance improvement can be expected. Glossary of Terms This tutorial will use 2 terms that might be new to readers. Argument –  An argument is another name for a Boolean expression that may appear in a join predicate, WHERE clause, or HAVING clause. Each of these clauses may have many arguments combined with AND and OR keywords. An argument might be "OrderDate = ...

Identifying TLS Version Using Azure SQL Auditing

Image
Understanding TLS and Its Role in Database Security Transport Layer Security (TLS) is the cornerstone of secure data transmission over the internet. It safeguards data integrity and confidentiality during communication between clients and servers. In the context of Azure SQL Database, TLS plays a vital role in encrypting and securing connections, thereby thwarting potential eavesdropping and data tempering attempts. The client_tls_version_n Field in Azure SQL Auditing The field records the version of the TLS protocol used by client when establishing a connection to the Azure SQL Database. Monitoring this field is crucial for several reasons: 1. Ensuring Compliance with Security Standards : Many industries mandate the use of specific TLS versions to meet security guidelines. The  client_tls_version_n   field helps verify compliance with these standards. 2. Identifying Outdated TLS Versions : Older TLS versions, like TLS 1,0 and 1.1, are considered less secure. This field helps ...