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
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 1
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.
CTEs with Multiple Recursive Members 2
Itzik provides two examples of CTEs with multiple recursive members: genealogy-related queries and the nested set model for representing graphs.
SQL Server 2012 Solutions for Median Calculation 1
Itzik examines new T-SQL features in SQL Server 2012 for computing the median. The type of median calculation he focuses on is one that assumes a continuous distribution model.
red jigsaw puzzle with missing piece
T-SQL Puzzle 4
Itzik presents a puzzle based on the British game show Blockbusters. See whether you can use T-SQL to solve the puzzle.

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
Dec 16, 2014
Sponsored

Eight SQL Server Signs the Illuminati Exist

Make no mistake about it, the signs that the Illuminati exist are all around us. You can find their markings on our buildings, on our currency and even in our music videos. That’s right, they’re everywhere!...More
Dec 2, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 16: Job Synchronization Checkup Logic

With Linked Servers configured to allow cross-host or cross-box communication between the servers you’re using to host your AlwaysOn Availability Groups, it’s time to start looking at some scripts that can be used to regularly check whether or not SQL Server Agent jobs are correctly synchronized across all servers in your topology....More
Abstract illustration of linked SQL Servers
Nov 18, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 15: Setting Up Linked Servers

Learn about setting up Linked Server definitions to let two (or more) servers in an AlwaysOn Availability Group talk to each other and check up on job statuses of jobs running on each other....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) ×