T-Sql

Performance Tuning with SQL Server Dynamic Management Views

Sergio Govoni

Dal portale Red-Gate è possibile scaricare gratuitamente, in formato PDF, l’eBook Performance Tuning with SQL Server Dynamic Management Views scritto da Louis Davidson (@drsql) e Tim Ford (@sqlagentman).

Performance Tuning With SQL Server Dynamic Management Views 244x300

Le DMV (Dynamic Management Views and Functions) sono oggetti che pubblicano informazioni sullo stato di salute dell’istanza SQL Server. Permettono di monitorare il cuore del sistema, diagnosticare problemi e misurare le performance, rappresentano uno strumento utilissimo sia per i DBA che per gli sviluppatori di soluzioni database. Il libro spiega come accedere alle informazioni esposte dalle DMV più frequentemente utilizzate per fare troubleshooting sull’esecuzione delle query, sull’utilizzo degli indici, sulle operazioni di I/O, sulle attività eseguite da una determinata sessione e da una determinata transazione.

Boost Your T-SQL with the APPLY Operator

Davide Mauri

Microsoft Virtual Accademy ha pubblicato un bel webcast fatto da Itzik Ben-Gan dedicato all’uso dell’operatore APPLY, estremamente potente e tipicamente poco utilizzato. Di seguito il link:

Boost Your T-SQL with the APPLY Operator

Need creative solutions to T-SQL issues? Get them from Itzik Ben-Gan, one of the world’s foremost authorities, along with Microsoft Program Manager Umachandar Jayachandran. These experts demonstrate the APPLY operator, a T-SQL feature that can be used to solve a wide variety of problems. What’s especially interesting about APPLY is how it can be used in conjunction with many T-SQL features. To demonstrate this aspect of APPLY, the session tracks the operator through time, discussing features that were initially introduced in different versions of SQL Server (7.0, like TOP, through 2012, like OFFSET-FETCH), some of which are widely used today. For each feature, the session describes its shortcomings and then shows how to use APPLY to overcome it and to improve the feature.

Building Your T-SQL Tool Kit: Window Function Fundamentals

Sergio Govoni

Sul canale SQLPASS TV è stata pubblicata la sessione Building Your T-SQL Tool Kit: Window Function Fundamentals tenuta da Christina E. Leo (@christinaleo) durante lo scorso PASS Summit 2013.

Abstract

Have you pulled a script to identify duplicates from a blog post but couldn’t quite get it to work because you weren’t sure what that ROW_NUMBER() function was doing? Maybe you heard talk about creating running totals without using subqueries, but you got frustrated when the groups weren’t totaling correctly. Or maybe, you’ve never even heard of window functions. All are good reasons to attend this all-demo session, which demystifies this versatile T-SQL tool. First, we’ll break apart the OVER clause, the key to understanding how window functions work. Then we’ll expand on each group of functions that can use the OVER clause: ranking, aggregate, and analytic functions. Finally, we’ll look at real scenarios where this tool works and talk about performance considerations. When you leave, you’ll have the fundamentals you need to fully develop your mastery of window functions.

SQL Server Backup and Restore

Sergio Govoni

Dal portale Red-Gate è possibile scaricare gratuitamente, in formato PDF, l’eBook SQL Server Backup and Restore scritto da Shawn McGehee.

Tra le attività più importanti sotto la responsabilità del DBA c’è il controllo dei backup e la preparazione del piano di recovery. In questo eBook, Shawn McGehee spiega come costruire un piano di recovery efficiente perché, dopo aver scoperto che un database è danneggiato oppure che alcuni dati sono stati persi, non c’è notizia peggiore di quella che ci annuncia che non li possiamo recuperare perché non c’è un backup valido! Non basta fare il backup, bisogna verificare che sia possibile effettuare anche il restore!

No More Bad Dates

Sergio Govoni

Sul canale SQLPASS TV, continua la pubblicazione delle sessioni erogate al PASS Summit 2011. Questa settimana è stata pubblicata la sessione No More Bad Dates: Best Practices for Working with Dates and Times tenuta da Kendra Little (Managing Director, Brent Ozar Unlimited).

Abstract

Dates and times seem simple at first. Kendra Little will show you there’s more to it than you think. She’ll give you five best practices that will help you select the right temporal data type, avoid common issues, and use the most effective techniques to aggregate data. She’ll also explain painful problems with query performance and how to avoid them. Choose wisely: the correct types and high performing data access logic will scale like magic.