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
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 4
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.
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
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
Mar 6, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 19: Availability Group Database Backups

One of the biggest strengths of AlwaysOn Availability Groups is that they allow DBAs to address both high availability and disaster recovery concerns from a single set of tooling or interfaces. But, this doesn’t mean that you won’t still need backups....More
Feb 25, 2015
Commentary

Data Profiling to the Rescue by Pushing Metadata Boundaries 1

Don’t let bad data sneak up on you when and where you least expect it. Ferret out bad data with Melissa Data’s newest Profiling Component for SSIS. Learn how to take control of your data using knowledge-base-driven metadata. The truth shall set you free!...More
Feb 16, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 18: Health Checks for Availability Groups 1

Now that we’ve outlined the process to let servers in a SQL Server AlwaysOn Availability Group "talk to each other" by means of setting up linked servers, it’s possible to set up some additional or improved checks on Availability Group Health....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) ×