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
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 13
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 5
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.
sequence
Identifying a Subsequence in a Sequence, Part 3 2
Itzik Ben-Gan presents two reader-submitted solutions for identifying a subsequence within a sequence, both of which far surpass his original solutions.
SQL spelled out on keyboard
Optimization Tips for Multiple Range Predicates, Part 2 1
Itzik covers three practical examples affected by the multiple range predicate problem, as well as optimization tips to improve performance.
SQL database code
Optimization Tips for Multiple Range Predicates, Part 1 2
Multiple range predicates can be the source of query performance problems. Itzik presents some tips for optimizing your solutions.
prescription drugs
T-SQL Interval Graphs Challenge, Part 2 1
In Part 2 of this article, Itzik Ben-Gan uses T-SQL to provide the complete solution to an interval packing problem related to drug prescriptions modeled as interval graphs.

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
May 12, 2016
blog

The 7 C's of Data Quality

Data quality is really important. Why? Because it helps you save money while increasing profits because of accurate contact data. It’s important to understand what data quality is and why it is important....More
Apr 21, 2016
blog

Turning Global Addresses into your Biggest Asset

Sponsored Blog Are you dealing with national and international records? The more expansive your records are in territory, the more problems you will face when it comes to verifying addresses. Not only are you dealing with language differences, but you are also dealing with different address formatting for different countries....More
Mar 14, 2016
blog

Building Your Business with Quality Data

Your contact data is valuable, but is it up to its full potential? Without the proper maintenance, the quality of your data quickly decreases--so quickly that 50% of databases deteriorate after only two years. It is an absolute necessity to maintain your data in order to decrease costs and increase profits....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) ×