Itzik Ben-Gan

Itzik
Ben-Gan

Itzik Ben-Gan is a contributing editor to SQL Server Pro and a cofounder of SolidQ. He teaches, lectures, and consults internationally. He's a SQL Server MVP and is the author of several books about T-SQL, including Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions (Microsoft Press).

Check out Itzik's Puzzled by T-SQL blog.
Twitter: @ItzikBenGan

Articles
First Look at System-Versioned Temporal Tables-Part 2: Querying Data and Optimization Considerations
This article is the second part in a two-part series about system-versioned temporal tables—a new feature introduced in Microsoft SQL Server 2016. Part 1 covered what system-versioned temporal tables are, how to create them and how to modify data in them. This article focuses on querying data and optimization considerations.
First Look at System-Versioned Temporal Tables-Part 1: Creating Tables and Modifying Data 2
SQL Server 2016 introduces support for system-versioned temporal tables based on the ISO/ANSI SQL:2011 standard. A table without system versioning enabled holds only the current, most recent, state of its rows. You cannot query past, deleted or pre-updated states of rows. For the purpose of our discussion, I’m ignoring row-versioning capabilities related to concurrency control, like the multi-versioning concurrency control (MVCC) support of the In Memory OLTP engine, and the row versioning support of the snapshot and read committed snapshot isolation levels for disk-based tables.
Improvements in Table Variables and Temporary Tables in SQL Server 2014 1

SQL Server 2014 introduces a number of gems that can make your solutions faster: support for inline index definitions, memory optimized table types and table valued parameters (TVPs), parallel SELECT INTO, relaxed eager writes and improved cardinality estimates for table variables. The last two improvements were also backported to SQL Server 2012. Some of the new features target specifically temporary objects, whereas others are more general and just happen to effect temporary objects as well.

Puzzle Me This: String Replacement 2
If you love numbers, logic and puzzles, this one is for you.
table data
Table Variable Tip 2
One great reason to use table variables rather than temporary tables is that table variables aren't affected when a user transaction rolls back.
missing puzzle piece
The Last non NULL Puzzle 7
Returning the last non NULL value is a common and simple need, but there's no straightforward solution.
question mark key
Use the TOP Filter's WITH TIES Option 2
Take a little quiz to see if you know what the TOP filter's WITH TIES option does.
database
Avoid Unnecessary Lookups when Using ROW_NUMBER for Paging
Eliminate unnecessary lookups to improve the performance of the typical solution for paging using row numbers.
data center
Compute a Trimmed Mean
Use the trimmed mean method to exclude outliers from the computation of an average aggregate.
table data
Learn How to Deduplicate Data 1
Discover a simple method for deduplicating data.
filter
Get Accurate Estimates with Filtered Indexes 1
Use filtered indexes and statistics for improved cardinality estimates.
number values
Find a Minimum Missing Value 5
Discover the most efficient method to identify the minimum missing value after the minimum existing value.
databases
Sequence and Identity Performance
Learn how SQL Server handles caching for sequence and identity, as well as how to determine the optimal cache size for your environment.
warehouse inventory
T-SQL Challenges: Replenishing and Depleting Quantities 4
Itzik discusses two T-SQL challenges: replenishing quantities and depleting quantities. He presents an efficient solution for replenishing quantities and challenges you to find an efficient solution for depleting quantities.
optimize
Optimization Tips for Multiple Range Predicates, Part 3
Itzik dives even deeper into the problem of using multiple predicates in your query filters.

Digital Magazine Archives

Browse back issues of SQL Server Pro, from January 2007 through the last issue published in April 2014. Find the back issues here.

 

From the Blogs
New Power BI Designer unifies the “power” tools
Jun 3, 2015
Article

Power BI Preview Gaining Market Momentum

As summer nears, the Power BI Preview is making bigger waves with every weekly release. Popular data sources and a plethora of Power BI Designer enhancements are being released at light speed pace. Check out the highlights on what has been released and what we might see next....More
Evolution of SQL Server continues
Jun 3, 2015
Article

What is Coming in SQL Server 2016 for Business Intelligence 1

Over the past few years we did not hear anything from Microsoft about SQL Server on-premises business intelligence enhancements. The extended cricket-chirping silence left us speculating about the future of Reporting Services, Analysis Services and other key technologies that are being used today to power critical decision making solutions. Good news, the waiting and wondering is over. Microsoft recently announced significant SQL Server on-premises upgrades for business intelligence in numerous presentations at both //build and Ignite conferences....More
May 28, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 25: Final Remarks on Backups

In the last few posts (posts 19 – 24) I’ve covered some high-level concerns and reviewed some details about how to implement and manage database backups against AlwaysOn Availability Group databases. Most of the information I’ve provided was pretty basic or elementary – along with some additional guidelines for things to watch out for when managing backups. Which is to say that backups are never something you can simply take for granted and they’re never something you just take lightly....More
SQL Server Pro Forums

Get answers to questions, share tips, and engage with the SQL Server community in our Forums.

Sponsored Introduction Continue on to (or wait seconds) ×