<![CDATA[Latest Content by Itzik Ben-Gan]]>http://www.sqlmag.com/authors/author/author/5779340/rss/5779340en-USFri, 25 May 2012 09:13:30 GMTFri, 25 May 2012 09:13:30 GMT<![CDATA[T-SQL Best Practices, Part 2]]>http://www.sqlmag.com/article/tsql/tsql-best-practices-141537
By Itzik Ben-Gan
Itzik continues his discussion of T-SQL best practices; he discusses cloud compatibility, date and time best practices, the importance of writing in a standard way, and performance-related best practices.]]>
Itzik Ben-GanTue, 22 May 2012 10:07:00 GMThttp://www.sqlmag.com/article/tsql/tsql-best-practices-141537
<![CDATA[T-SQL Best Practices, Part 1]]>http://www.sqlmag.com/article/tsql/tsql-best-practices-141536
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanFri, 20 Apr 2012 10:05:00 GMThttp://www.sqlmag.com/article/tsql/tsql-best-practices-141536
<![CDATA[Understanding Query Plans]]>http://www.sqlmag.com/article/tsql/understanding-query-plans-141850
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanMon, 19 Mar 2012 05:00:00 GMThttp://www.sqlmag.com/article/tsql/understanding-query-plans-141850
<![CDATA[SQL Server 2012: How to Write T-SQL Windows Functions, Part 3]]>http://www.sqlmag.com/article/tsql/tsql-windows-functions-part-3-141036
By Itzik Ben-Gan
Itzik wraps up his discussion of SQL Server 2012’s window functions by focusing on optimization. He provides indexing guidelines for optimal performance, and he describes cases with especially optimal treatment, cases that compute the difference between two cumulative values, cases that expand all frame rows, and cases in which the optimizer can use an in-memory spool versus an on-disk spool.]]>
Itzik Ben-GanThu, 26 Jan 2012 11:18:00 GMThttp://www.sqlmag.com/article/tsql/tsql-windows-functions-part-3-141036
<![CDATA[Microsoft SQL Server 2012: How To Write T-SQL Window Functions, Part 2]]>http://www.sqlmag.com/article/tsql/sql-server-2012-window-functions-141022
By Itzik Ben-Gan
SQL Server 2012 enhances support for window aggregate functions. In part 2 of this series, Itzik discusses window offset functions and window distribution functions.]]>
Itzik Ben-GanTue, 13 Dec 2011 09:54:00 GMThttp://www.sqlmag.com/article/tsql/sql-server-2012-window-functions-141022
<![CDATA[How to Use Microsoft SQL Server 2012's Window Functions, Part 1]]>http://www.sqlmag.com/article/tsql/sql-server-2012-window-functions-140228
By Itzik Ben-Gan
SQL Server 2012 enhances support for window aggregate functions by introducing window order and frame clauses, support for offset functions, and support for window distribution functions. In this article, Itzik introduces the concept of windowing; he describes the elements involved in window specifications, and he covers window aggregate functions.]]>
Itzik Ben-GanMon, 21 Nov 2011 15:32:00 GMThttp://www.sqlmag.com/article/tsql/sql-server-2012-window-functions-140228
<![CDATA[T-SQL String Manipulation Tips and Techniques, Part 2]]>http://www.sqlmag.com/article/tsql/string-manipulation-tips-techniques-part-2-139782
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanWed, 26 Oct 2011 12:00:00 GMThttp://www.sqlmag.com/article/tsql/string-manipulation-tips-techniques-part-2-139782
<![CDATA[T-SQL String Manipulation Tips and Techniques, Part 1]]>http://www.sqlmag.com/article/tsql/string-manipulation-tips-techniques-part-1-136427
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanWed, 14 Sep 2011 10:35:00 GMThttp://www.sqlmag.com/article/tsql/string-manipulation-tips-techniques-part-1-136427
<![CDATA[Use T-SQL to Generate a Sequence]]>http://www.sqlmag.com/article/sql-server/license-plates-challenge-136376
By Itzik Ben-Gan
Itzik presents a real-world T-SQL challenge that involves generating a sequence of license plates.]]>
Itzik Ben-GanTue, 16 Aug 2011 11:16:00 GMThttp://www.sqlmag.com/article/sql-server/license-plates-challenge-136376
<![CDATA[SQL Server 2005’s APPLY, Part 2]]>http://www.sqlmag.com/article/sql-server/SQL Server 2005 Apply -136248
By Itzik Ben-Gan
More advanced uses of the APPLY table operator include efficient parallelism of queries, reuse of column aliases, aggregate over columns, unpivoting, and inlining scalar functions.]]>
Itzik Ben-GanMon, 25 Jul 2011 14:00:00 GMThttp://www.sqlmag.com/article/sql-server/SQL Server 2005 Apply -136248
<![CDATA[SQL Server 2005’s Apply, Part 1]]>http://www.sqlmag.com/article/tsql/SQL-Server-2005-Apply-129874
By Itzik Ben-Gan
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. Itzik describes three forms of APPLY: CROSS APPLY, OUTER APPLY, and implicit APPLY.]]>
Itzik Ben-GanMon, 20 Jun 2011 15:07:00 GMThttp://www.sqlmag.com/article/tsql/SQL-Server-2005-Apply-129874
<![CDATA[SIDEBAR: How to Determine the Default Cache Value in SQL Server Denali]]>http://www.sqlmag.com/article/sql-server/Sidebar-How-to-Tell-What-the-Default-Cache-Value-is--129206
By Itzik Ben-Gan
SIDEBAR: How to Determine the Default Cache Value in SQL Server Denali]]>
Itzik Ben-GanTue, 24 May 2011 16:04:00 GMThttp://www.sqlmag.com/article/sql-server/Sidebar-How-to-Tell-What-the-Default-Cache-Value-is--129206
<![CDATA[Sequences, Part 2]]>http://www.sqlmag.com/article/sql-server/Sequences-Part-2-129205
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanMon, 23 May 2011 15:56:00 GMThttp://www.sqlmag.com/article/sql-server/Sequences-Part-2-129205
<![CDATA[T-SQL Foundations: Thinking in Sets]]>http://www.sqlmag.com/article/tsql/Thinking-in-Sets-129772
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanWed, 20 Apr 2011 17:40:00 GMThttp://www.sqlmag.com/article/tsql/Thinking-in-Sets-129772
<![CDATA[Sequences, Part 1]]>http://www.sqlmag.com/article/tsql/Sequences-Part-1-129203
By Itzik Ben-Gan
SQL Server Denali provides support for sequences, which are more flexible than the IDENTITY column property and offer several advantages over IDENTITY.]]>
Itzik Ben-GanSun, 17 Apr 2011 15:50:00 GMThttp://www.sqlmag.com/article/tsql/Sequences-Part-1-129203
<![CDATA[Parallelism in SQL Server Query Tuning]]>http://www.sqlmag.com/article/sql-server/options-affecting-parallelism-141505
By Itzik Ben-Gan
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.]]>
Itzik Ben-GanMon, 14 Mar 2011 15:51:00 GMThttp://www.sqlmag.com/article/sql-server/options-affecting-parallelism-141505
<![CDATA[OFFSET/FETCH, Part 2]]>http://www.sqlmag.com/article/tsql/OFFSET-FETCH-Part-2-129202
By Itzik Ben-Gan
Itzik continues his discussion of the new SQL Server filter called OFFSET/FETCH. He explains the use of the filter in table expressions, logical query processing, modifications, determinism, and randomization.]]>
Itzik Ben-GanFri, 11 Mar 2011 08:56:00 GMThttp://www.sqlmag.com/article/tsql/OFFSET-FETCH-Part-2-129202
<![CDATA[OFFSET/FETCH, Part 1]]>http://www.sqlmag.com/article/tsql/OFFSET-FETCH-Part-1-129201
By Itzik Ben-Gan
SQL Server 11 introduces a new filter called OFFSET/FETCH that allows filtering a requested range of rows based on given ordering, a number of rows to skip, and a number of rows to return.]]>
Itzik Ben-GanMon, 14 Feb 2011 13:09:00 GMThttp://www.sqlmag.com/article/tsql/OFFSET-FETCH-Part-1-129201
<![CDATA[Unpivoting Data]]>http://www.sqlmag.com/article/database-administration/unpivoting-data
By Itzik Ben-Gan
Unpivoting involves rotating data from a state of columns to a state of rows. Itzik presents three techniques to unpivot data, based on the UNPIVOT operator, a cross join, and the APPLY operator.]]>
Itzik Ben-GanTue, 25 Jan 2011 08:57:00 GMThttp://www.sqlmag.com/article/database-administration/unpivoting-data
<![CDATA[Row Value Constructor]]>http://www.sqlmag.com/article/sql-server/row-value-constructor
By Itzik Ben-Gan
Future versions of SQL Server would benefit from support for the row value constructor feature, which makes code less verbose, more readable, and easier to maintain.]]>
Itzik Ben-GanWed, 17 Nov 2010 10:20:00 GMThttp://www.sqlmag.com/article/sql-server/row-value-constructor