Free Downloads
Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions (Developer Reference)

Apply powerful window functions in T-SQL—and increase the performance and speed of your queries Optimize your queries—and obtain simple and elegant solutions to a variety of problems—using window functions in Transact-SQL. Led by T-SQL expert Itzik Ben-Gan, you’ll learn how to apply calculations against sets of rows in a flexible, clear, and efficient manner. Ideal whether you’re a database administrator or developer, this practical guide demonstrates ways to use more than a dozen T-SQL querying solutions to address common business tasks. Discover how to: Go beyond traditional query approaches to express set calculations more efficiently Delve into ordered set functions such as rank, distribution, and offset Implement hypothetical set and inverse distribution functions in standard SQL Use strategies for improving sequencing, paging, filtering, and pivoting Increase query speed using partitioning, ordering, and coverage indexing Apply new optimization iterators such as Window Spool Handle common issues such as running totals, intervals, medians, and gaps

Series: Developer Reference

Paperback: 244 pages

Publisher: Microsoft Press; 1 edition (April 25, 2012)

Language: English

ISBN-10: 0735658366

ISBN-13: 978-0735658363

Product Dimensions: 7.2 x 0.6 x 9 inches

Shipping Weight: 13.6 ounces (View shipping rates and policies)

Average Customer Review: 4.5 out of 5 stars  See all reviews (17 customer reviews)

Best Sellers Rank: #394,690 in Books (See Top 100 in Books) #60 in Books > Computers & Technology > Programming > Microsoft Programming > SQL Server #190 in Books > Computers & Technology > Databases & Big Data > SQL #226 in Books > Computers & Technology > Databases & Big Data > Data Mining

This book is a refreshing alternative to the usual 900 page everything-and-the-kitchen sink tomes that seem to dominate this genre.Instead, it is focused and concise (200+ pages). And extremely well-written, by someone who clearly takes his teaching role seriously. Beyond just describing how to use the window functions, it does a great job of delving into the background needed to really understand how & why they work as they do.In addition to describing SQL Server 2012 support for window functions, the book also details those areas in which full support for standard SQL window functions has not yet been implemented in SQL Server. It also suggests improvements that could be made to both the standard and to MS SQL.Whenever possible, the book gives alternative queries constructed without the use of window functions. This is great as both a learning tool, and to convince you that in general you don't really want to go that route (non-window) if at all possible.If you want to learn both the subtleties and quotidian uses of SQL window functions, get this book. Your brain will light up with new possibilities.(If it helps credibility-wise, check out my mostly negative review of the same author's "Inside Microsoft SQL Server 2005: T-SQL Programming"--I am the proud holder of the "Most Helpful Critical Review" honor for that title. Ben-Gan's lucidity has increased considerably with this current effort.)

One of the good "Cheat" book I came across. Yes, I agree with many that there is no doubt Itzik Ben-Gan is one of the great T-SQL experts in the industry. Initially I thought many of the functions he described cannot be used in OLTP model. Very quickly I realized I was wrong to some extent, I had to identify duplicate entries and Islands and the queries were right there. But I think I will stick to my Original Comment - the book is very specific for certain window function as the title suggests which are - ranking, distribution, ordering, getting ranges, gaps, island, duplicates, running totals, packing intervals, aggregates and finally optimizing them. Ofcourse that's what the title suggest (Window Functions..) and is very well concised in 200 odd pages when compared to 900 or so in other books. Actually I was expecting - to know different alternatives for creating such functions, which I did not find much. There is a mention of CLR, but one should be good with .NET coding. My final conclusion would be go for the book in case you have to deal a lot with analytical type of coding. This is the book, where we can simply use the proven logic.

Since I actually used the sample chapters to solve a problem with updating all duplicate rows except the first duplicate in a set of duplicates I thought I should break down and buy the book. I consider it somewhat of a brain twister and will use this to further my query expertise. I am one of those DBA's that has so many instances to manage that I rarely ever get to do any coding for many years now. I am hoping this helps bring back some, and develope new, skills. I also decided to get the fundamentals book and will switch between the 2.For now i will give this 5 stars but I still think it could be made simpler and more practical for us 'regular' users. I will say the accuracy of the book and samples seems pretty good so far which is nice since it can be annoying when you run into samples you are trying to learn from that don't work in some articles by other authors I have read. This authors material and books seem very accurate.I wonder if regular expressions would be useful with these functions?

The book has proven invaluable on the job in a current project.I had used 'window' functions in the past; however, I truly did not have a real understanding of what 'result set' I was working with. And, as correctly stated, performance was 'blazing' now that the use of a 'window' function is known to be using the current result set. While probably not a 'nugget' for SQL experts, just realizing that proved a real 'tip'...I have used other books by the author and found his instructional style quite pleasing to deal with considering the 'complexity' of how one 'should' think when dealing with SQL.

The book started off great explaining Window Functions; however I felt that there were certain parts that the author could have left out. For example, he went over some functionality that wasn't available in SQL SERVER; where I was hoping he would focus primarily with what was currently available. Overall, it's a good book; I'm definitely going to have to read it again.

Let's take a look at this: You're required to Rank all Items Sold this year ("Rank all items") by Sales ($), and on the same data set, rank them within their respective categories ("Rank within rank").Ok, you can probably code this in a couple of minutes. I see that you can achieve this by CTE's and Subqueries, etc.But you can achieve the same result in fewer lines of code using Window Functions. And, you'll make your DBA very happy with the performance gained from using Window Functions.I think you should read this book.

Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions (Developer Reference) SQL: Learn SQL In A DAY! - The Ultimate Crash Course to Learning the Basics of SQL In No Time (SQL, SQL Course, SQL Development, SQL Books, SQL for Beginners) Hands-on Study Guide for Exam 70-411: Administering Windows Server 2012 R2 (Exam 70-411, 70-411, Exam Ref 70-411, MCSA Windows Server 2012 R2, MCSE Windows Server 2012 R2) Expert T-SQL Window Functions in SQL Server Microsoft SQL Server 2012 Internals (Developer Reference) Pro SQL Server 2012 BI Solutions (Expert's Voice in SQL Server) SQL Server 2012 Integration Services Design Patterns (Expert's Voice in SQL Server) SQL: QuickStart Guide - The Simplified Beginner's Guide To SQL (SQL, SQL Server, Structured Query Language) Red Hat Enterprise Linux (RHEL) 7 Server Installation and Administration: Training Manual: Covering CentOS-7 Server, Cloud computing, Bind9 DNS Server and Fedora 23 Server Red Hat Enterprise Linux (RHEL) 6 Server Installation & Administration: Training Manual: Covering CentOS-6, OpenSUSE 11.3 Server, Mandriva Enterprise Server, and Fedora 14 Server Beginning SQL Server 2008 Express for Developers: From Novice to Professional (Expert's Voice in SQL Server) Pro SQL Server 2008 Failover Clustering (Expert's Voice in SQL Server) Microsoft Excel 2013 Functions & Formulas Quick Reference Card (4-page Cheat Sheet focusing on examples and context for intermediate-to-advanced functions and formulas- Laminated Guide) Microsoft Excel 2010 Functions & Formulas Quick Reference Guide (4-page Cheat Sheet focusing on examples and context for intermediate-to-advanced functions and formulas- Laminated Guide) Windows Server 2012 R2: How to install and add roles?: (Desktop Experience) (Windows Server 2012 R2: From installation to configuration) MCSA Guide to Microsoft SQL Server 2012 (Exam 70-462) (Networking (Course Technology)) Professional Microsoft SQL Server 2012 Analysis Services with MDX and DAX Beginning Microsoft SQL Server 2012 Programming Microsoft Surface Pro 4 & Microsoft Surface Book: The Beginner's Guide to Microsoft Edge, Cortana & Mail App on Microsoft Surface Pro 4 & Microsoft Surface Book MySQL Pocket Reference: SQL Statements, Functions and Utilities and more (Pocket Reference (O'Reilly))