Skip to Content
Inside Microsoft® SQL Server® 2008: T-SQL Querying
book

Inside Microsoft® SQL Server® 2008: T-SQL Querying

by Lubor Kollar Itzik Ben-Gan Dejan Sarka, and Steve Kass
March 2009
Intermediate to advanced
832 pages
23h 49m
English
Microsoft Press
Content preview from Inside Microsoft® SQL Server® 2008: T-SQL Querying

Iteration/Recursion

Iterative approaches apply some form of loops or recursion. Many iterative algorithms traverse graphs. Some traverse graphs a node at a time and are usually implemented with cursors, but these are typically very slow. I will focus on algorithms that traverse graphs one level at a time using a combination of iterative or recursive logic and set-based queries. Given a set of nodes U, the next level of subordinates refers to the set V, which consists of the direct subordinates (children) of the nodes in U. In my experience, implementations of iterative algorithms that traverse a graph one level at a time perform much better than the ones that traverse a graph one node at a time.

Using iterative solutions has several advantages ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside Microsoft® SQL Server® 2008: T-SQL Programming

Inside Microsoft® SQL Server® 2008: T-SQL Programming

Dejan Sarka Itzik Ben-Gan Greg Low, Roger Wolter, Ed Katibah, and Isaac Kunen
Microsoft® SQL Server® 2008 Internals

Microsoft® SQL Server® 2008 Internals

Paul Randal Kalen Delaney Kimberly Tripp, and Conor Cunningham
Microsoft® SQL Server 2012 Unleashed

Microsoft® SQL Server 2012 Unleashed

Ray Rankins, Paul T. Bertucci, Chris Gallelli, Alex T. Silverstein

Publisher Resources

ISBN: 9780735634763Purchase book