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

illustration of computer code with man's face in background
T-SQL Best Practices, Part 1
Some T-SQL best practices include thinking in a relational way, always remembering NULLs and the three-valued-logic, realizing the full implications of using the NOLOCK hint and therefore avoiding it, and adopting good coding practices.
Example to demonstrate an actual SQL Server execution plan
Understanding Query Plans 2
A key element in query tuning is using the execution plan to determine the reasons for poor query performance. SQL Server provides rich information about query plans in the graphical as well as XML forms of plans.
SQL Server 2012: How to Write T-SQL Window Functions, Part 3 1
Itzik wraps up his discussion of SQL Server 2012's window functions by focusing on optimization.
percentage sign in the clouds
T-SQL Challenge - January 18, 2012

If you're looking for a good querying challenge, try to come up with your own solutions to computing PERCENTILE_CONT and PERCENTILE_DISC for a given input argument @pct. Here's how standard SQL defines the computations when applied as ordered set functions:

Microsoft SQL Server 2012: How to Write T-SQL Window Functions, Part 2 1
SQL Server 2012 enhances support for window aggregate functions. In part 2 of this series, Itzik discusses window offset functions and window distribution functions.
How to Use Microsoft SQL Server 2012's Window Functions, Part 1 5
In this article, Itzik introduces the concept of windowing; he describes the elements involved in window specifications, and he covers window aggregate functions.
T-SQL String Manipulation Tips and Techniques, Part 2
Itzik explains how to handle type conversions when you need to convert a character string value to another type, in both SQL Server 2008 and SQL Server Denali.
colorful balls of string
T-SQL String Manipulation Tips and Techniques, Part 1
Learn about some common string manipulation tasks, such as counting occurrences of a substring within a string, verifying an exact number of occurrences of a substring within a string, and replacing multiple contiguous spaces with a single space.
Indiana automobile license plate
Use T-SQL to Generate a Sequence 1
Itzik presents a real-world T-SQL challenge that involves generating a sequence of license plates.
man typing on computer keyboard with data in the background
SQL Server 2005's Apply, Part 1
The APPLY table operator accepts two table expressions as input and applies the right table expression to each row from the left, allowing correlations from the right table expression to refer to attributes from the left side.
How to Determine the Default Cache Value in SQL Server Denali 1
In the current implementation of SQL Server 2012 (formerly code-named Denali), sequences use a cache value of 50 by default—however, this information isn’t officially documented anywhere because Microsoft wants to preserve the right to change it. So, how can you tell what the current cache value is?
Sequences, Part 2
SQL Server Denali’s sequences feature provides several advantages over the IDENTITY column property. Learn how to cache sequence values, obtain a range of sequence values, and produce multiple unique sequence values in the same target row.
man planning database
T-SQL Foundations: Thinking in Sets
Itzik discusses the foundations of set theory and explains why it’s important to think in terms of sets when addressing querying tasks rather than thinking in iterative or cursor terms.
man typing on keyboard with database servers in background
Sequences, Part 1
SQL Server 2012 provides support for sequences, which are more flexible than the IDENTITY column property and offer several advantages over IDENTITY.
Parallelism in SQL Server Query Tuning
SQL Server's choices of whether or not to use parallelism, the degree of parallelism (DOP), and CPU costing aspects of iterators depend on the number of CPUs available in the machine. Itzik presents two tools that make it easy to work on parallelism aspects of queries when you don't have access to the target system.
Upcoming Conferences

Register now to get the best rate available!

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
Two women looking a man's computer monitor
Sep 17, 2014

AlwaysOn Availability Groups and SQL Server Jobs, Part 6: High-Level Options and Rationale for Handling Batch Jobs

There are a couple of options for how we could handle batch jobs when Availability Groups are thrown into the mix....More
Sep 12, 2014

Managing a Healthy SQL Server Database: Three Principles We Overlook

In managing a database or sometimes numerous databases, we often get caught up in the day-to-day maintenance and lose sight of the other principles we know are critical to ensuring optimal performance. Here’s a quick refresher....More
Exclamation marke on yellow road sign
Sep 9, 2014

AlwaysOn Availability Groups and SQL Server Jobs, Part 5: Setting Up Failover Alerts

Alerts represent a great way to take a proactive stance on being notified or alerted when something ugly, potentially ugly, or important happens on a SQL Server. On most servers that I manage, I typically deploy a whole bevy of different alerts....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) ×