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 by Itzik Ben-Gan
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.
interval graph
T-SQL Interval Graphs Challenge, Part 1
Itzik Ben-Gan uses T-SQL to find an efficient solution to an interval packing problem related to drug prescriptions modeled as interval graphs.
Identifying a Subsequence in a Sequence, Part 2 4
Itzik Ben-Gan explores three set-based T-SQL solutions to find the best approach for identifying a subsequence within a sequence.
DNA strands representing iterative solution to finding subsequence in sequence
Identifying a Subsequence in a Sequence, Part 1 7
Itzik Ben-Gan explores several iterative T-SQL solutions to find the best approach for identifying a subsequence within a sequence.
Infinite loop to represent the SQL Server Halloween problem
Divide and Conquer Halloween
Query plans of T-SQL solutions based on the Decrease and Conquer algorithm contain extra work to deal with Halloween protection. Itzik presents an alternative generic pattern that removes the need for Halloween protection.
abstract clock
Intervals and Counts, Part 4
Learn how to compute the count of active intervals at the beginning of every fixed interval.
men on track running intervals with stopwatch
Intervals and Counts, Part 3
Many types of tasks involve handling date and time intervals and computing related counts. Learn how to compute the maximum count of concurrent sessions during every fixed interval within a certain input period.
IT/Dev Connection conference logo
T-SQL Querying and Query Tuning Full-Day Seminar at IT/Dev Connections in Vegas, Sept. 30
Join me for a full-day workshop about T-SQL querying and query tuning improvements in the last major releases of SQL Server (2012, 2008 and 2005).
time interval
Intervals and Counts, Part 2
Itzik presents an improved solution to last month's task using the APPLY operator for computing counts during discrete intervals, as well as a solution for computing counts during discrete intervals including packing logic.
intervals and counts
Intervals and Counts, Part 1
Learn how to identify discrete intervals and counts of overlapping source intervals.
Interval Queries in SQL Server
Interval-related queries tend to perform very inefficiently in SQL Server. Itzik presents an ingenious solution based on the Relational Interval Tree (RI-tree) model.
Unwanted T-SQL Expression Failures
Itzik discusses expression failures in T-SQL queries and presents a proposal to Microsoft for a new T-SQL feature called TRY_EXPRESSION that would provide a more general solution for preventing expression failures.
COALESCE vs. ISNULL
Some differences between the COALESCE and ISNULL functions make COALESCE preferable, whereas others make ISNULL preferable. Learn the differences, to make an educated decision about which to use.
Copying Data with Dependencies 2
Itzik uses a simple generic data model to demonstrate how to copy data from one set of related tables to another, including dependent rows, while preserving the correct relationships between the rows.
CTEs with Multiple Recursive Members, Part 2
Itzik explains how to use a recursive CTE with multiple recursive members to draw a Koch snowflake.
IT/Dev Connections

Register now to get the best rate available!

From the Blogs
Man with mustache at computer
Apr 23, 2014
blog

SQL Server Management Studio 2014: Notes from the Field 1

SQL Server Management Studio is a complex application that does a ton of wonderful things and, with SSMS 2014, there are still a couple of quirks or issues that I hope that Microsoft addresses or corrects someday....More
computer keyboard with blue save money key
Apr 15, 2014
blog

Save Thousands in Licensing Costs for SQL Server AlwaysOn Availability Groups 1

Windows Server 2012 or Windows Server 2012 R2 Standard Edition is a great way to save thousands on licensing—and save yourself some serious headaches when deploying SQL Server AlwaysOn Availabiliity Groups....More
Apr 8, 2014
blog

NoSQL: Eventual Consistency Yields Major Flaws 2

While I believe that NoSQL can have some places where it legitimately makes sense, I also believe that NoSQL is also the patently wrong choice for a number of different types of applications or use cases....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) ×