Remove implicit-conversion-in-sql-server
article thumbnail

Simple Parameterization and Trivial Plans — Part 2

SQL Performance

When SQL Server applies simple parameterization to an ad-hoc statement, it makes a guess about the data type of the replacement parameter. For the time being, let’s look at some examples using the Stack Overflow 2010 database on SQL Server 2019 CU 14. The bigint type isn’t used for server-side parameterization.

Cache 90
article thumbnail

Fundamentals of table expressions, Part 2 – Derived tables, logical considerations

SQL Performance

Last month I provided a background to table expressions in T-SQL. I explained the context from relational theory and the SQL standard. I explained how a table in SQL is an attempt to represent a relation from relational theory. The expression can be a query, but doesn't have to be.

C++ 143
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

T-SQL bugs, pitfalls, and best practices – window functions

SQL Performance

This article is the fourth installment in a series about T-SQL bugs, pitfalls and best practices. There are two common pitfalls involving window functions, both of which are the result of counterintuitive implicit defaults that are imposed by the SQL standard. Window frame with implicit RANGE option.

article thumbnail

SQL Server Latches – Other Latches To Know About

SQL Performance

To finish up my short series of articles on latches, this time I’m going to discuss a few other latches in SQL Server you might see occasionally but don’t merit a complete article by themselves. The LOG_MANAGER Latch. It can only be acquired in exclusive mode and can be a bottleneck during transaction log file growth.

Servers 57
article thumbnail

NULL Complexities – Part 2

SQL Performance

Last month I introduced the NULL as SQL's marker for any kind of missing value. I explained that SQL doesn't provide you with the ability to distinguish between missing and applicable (A-values) and missing and inapplicable (I-values) markers. This article is the second in a series on NULL complexities. NULL treatment inconsistencies.

Design 65
article thumbnail

C++ safety, in context

Sutter's Mill

We must make our software infrastructure more secure against the rise in cyberattacks (such as on power grids, hospitals, and banks), and safer against accidental failures with the increased use of software in life-critical systems (such as autonomous vehicles and autonomous weapons). Log4j ) or had nothing to do with programming languages (e.g.,

C++ 139
article thumbnail

Simple Parameterization and Trivial Plans — Part 4

SQL Performance

The most important things to understand about server-side parameterization are it doesn’t happen all at once and a final decision to parameterize isn’t made until the end of the process. Imagine someone handing you a query written for an unknown SQL Server database and asking you to identify parameterizable constants.

Cache 55