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
Puzzle Me This: String Replacement 1
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 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.

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 17, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 21: Assigning Backup Preferences

An option when creating new AlwaysOn Availability Groups is to specify Backup Preferences. It’s also something you can easily configure once the Availability Group has been set up as well – by simply right-clicking on the Availability Group and selecting Properties – then navigating into the Backup Preferences tab.  ...More
Mar 14, 2015
Commentary

For Data Quality, Intelligent Rules Add Value to the Golden Record 6

The quest for the Golden Record to achieve a single, accurate and complete version of a customer record is worth the pursuit to attain survivorship. Record matching and consolidation are only the beginning. Melissa Data takes a new approach. Learn how to apply intelligent rules based on reference data to make smarter and better decisions for data cleansing....More
Mar 12, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 20: Avoiding Backup Fragmentation

On SQL Servers where Availability Groups (or Mirroring) isn’t in play, I typically recommend keeping a combination of on-box backups along with copying said backups off-box as well. Obviously, keeping databases AND backups on the SAME server is the metaphorical equivalent of putting all of your eggs in one basket – and therefore something you should avoid like the plague....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) ×