Thursday, December 22, 2011

Inside SQL Server Optimizer Book

Guys,

Here is another book from Redgate, Inside SQL Server optimizer by Benjamin Nevarez.

Here's a quick overview of what the book covers:
  • Chapter 1, Execution Engine, Introduction to Query Optimization, starts with an overview on how the SQL Server Query Optimizer works, and introduces the concepts that will be covered in more detail in the rest of the book. A look into some of the challenges query optimizers still face today is covered next, along with a section on how to read and understand execution plans. The chapter closes with a discussion of join ordering, traditionally one of the most complex problems in query optimization.
  • Chapter 2 talks about the Execution Engine, describing it as a collection of physical operators that perform the functions of the query processor. It emphasizes how these operations, implemented by the Execution Engine, define the choices available to the Query Optimizer when building execution plans. This chapter includes sections on data access operations, the concepts of sorting and hashing, aggregations, and joins, to conclude with a brief introduction to parallelism.
  • Chapter 3, Statistics and Cost Estimation, shows how the quality of the execution plans generated by the Query Optimizer is directly related to the accuracy of its cardinality and cost estimations. The chapter describes Statistics objects in detail, and includes some sections on how statistics are created and maintained, as well as how they are used by the Query Optimizer. We'll also take a look at how to detect cardinality estimation errors, which may cause the Query Optimizer to choose inefficient plans, together with some recommendations on how to avoid and fix these problems. Just to round off the subject, the chapter ends with an introduction to cost estimation.
  • Chapter 4, Index Selection, shows how SQL Server can speed up your queries and dramatically improve the performance of your applications, just by using the right indexes. The chapter shows how SQL Server selects indexes, how you can provide better indexes, and how you can verify your execution plans to make sure these indexes are correctly used. We'll talk about the Database Engine Tuning Advisor and the Missing Indexes feature, which will show how the Query Optimizer itself can provide you with index tuning recommendations.
  • Chapter 5, The Optimization Process, goes right into the internals of the Query Optimizer and introduces the steps that it performs without you ever knowing. This covers everything, from the moment a query is submitted to SQL Server, until an execution plan is generated and ready to be executed, including steps like parsing, binding, simplification, trivial plan, and full optimization. Important components which are part of the Query Optimizer architecture, such as transformation rules and the memo structure, are also introduced.
  • Chapter 6, Additional Topics, includes a variety of subjects, starting with the basics of update operations, and how they also need to be optimized just like any other query, so that they can be performed as quickly as possible. We'll have an introduction to Data Warehousing and how SQL Server optimizes star queries, before launching into a detailed explanation of parameter sniffing, along with some recommendations on how to avoid some problems presented by this behavior. Continuing with the topic of parameters, the chapter concludes by discussing auto-parameterization and forced parameterization.
  • Chapter 7, hints, and warns that, although hints are a powerful tool which allow you to take explicit control over the execution plan of a query, they need to be used with caution, and only as a last resort when no other option is available. The chapter covers the most used hints, and ends with a couple of sections on plan guides and the USE PLAN query hint.
Its a very good book to understand a lot of features to enhance performance & also get a hands on what's happening in background.

Click here to download this book.

Happy Learning

Sudhir

Thursday, December 1, 2011

Microsoft's Virtual Tech Days 2011 from 14-16th DEC

Guys,

Microsoft is coming up with Virtual Tech Days from 14-16th Dec 2011.

Welcome to the next edition of the Virtual Tech Days event scheduled in the mid of December, we are very excited about the event and we are currently working out a highly interactive agenda where you will learn about future technologies from Microsoft and deep dive sessions across our platforms and solutions. There will be dedicated tracks for Developers, IT Pros and Architects in this edition of VTD. Stay tuned to this page to see the schedule and agenda coming up over the next few weeks

The focus will be on 3 tracks, Developer, IT Professionals & Architects. For Developers stress will be given on development technologies. For IT Professionals the focus will be on Administration, Sharepoint, Database etc.

Agenda for Architects is not yet published.

Click here to view Agenda. Note: Its different for each day.

Click here to Register for the event.

If you wish to view existing videos / presentations from old Virtual days then click here.

Happy Learning

Sudhir

Thursday, October 20, 2011

.Net, C#, C++ requirements for Mumbai (Credit Suisse) Bank

Guys,


My company Credit Suisse (department) is hiring people in Mumbai.

Here are details of the requirements and there are multiple positions:
  • .NET C# (4 - 7 years experience) with Winforms or WCF/WPF 
  • .NET C# (2 - 5 years experience) with experience working with 1 database technology (Sybase, SQL, Oracle) 
  • C++ (4 - 7 years experience) with strong Perl  
If interested then send your CV to me at sudhir.chawla@credit-suisse.com. Or for more information call me at +91-9920368156.

 
All the best.

Sudhir

Friday, September 30, 2011

Stored Procedure Vs Function in SQL Server

Guys,

Let's discuss some points about Stored Procedure & Functions in SQL Server.


Although both functions and sp's are prcomiled sql statements there exists some differences between them.

1. Functions must return a value(scalar,inline table or multi statement table) whereas stored proc may or may not return a value.


2.Functions can return a table whereas stored procs can create a table but can't return table.


3. Stored procs can be called independently using exec keyword whereas function are called using select statements.


4. Stored procs can be used to change server configuration(in terms of security-i.e. setting granular permissions of user rights) whereas function can't be used for this


5. XML and output parameters can't be passed to functions whereas it can be with sp's.


6.transaction related statement can be handled in sp whereas it can't be in function.


7. stored procedures can call a funtion or another stored proc similarly a function can call another function and a stored proc. The catch with function is that no user defined stored proc can be called. Only extended/system defined procs can be called.


8. We can have extended stored procedures but not extended functions.


9. A function can be used in a Join whereas Stored proc can't be used in a Join.

Hope this is helpful.


Sudhir Chawla

Monday, August 29, 2011

24 Hours of PASS: Summit 2011 Preview

Guys,


24 Hours of PASS is back with more sessions on September 7th and 8th. Join knowledgeable SQL Server experts - slated to present in-depth sessions at PASS Summit 2011 - as they preview their SQL Server session topics over these 24 free technical webcasts.
When: 
Singapore 8 PM, 
India 5:30 PM



Detail of Sessions: 


  Session 01 Brian Knight
Brian Knight, SQL Server MVP, MCSE, MCDBA, is the co-founder of SQLServerCentral.com, BIDN.com and SQLShare.com. He works as President and lead architect for Pragmatic Works and has written thirteen books on SQL Server over his fifteen year database career.
Presenting: INTRODUCTION TO DATA MINING IN SQL SERVER ANALYSIS SERVICES. Learn how to create a data mining model to predict your best customers, use algorithms to ensure your marketing budget is spent wisely and use Time Series analysis for budgeting and forecasting.
 Session 02 Brent Ozar
Brent Ozar is a Microsoft Certified Master of SQL Server 2008, a Microsoft SQL Server MVP, and co-founder of Brent Ozar PLF. Brent has over a decade of experience with SQL Server, systems administration, SAN administration, virtualization administration, and project management. Brent blogs at http://www.BrentOzar.com like it's going out of style.
Presenting: SAN BASICS FOR DBAs. They keep telling you it's a SQL problem - but is it? Learn the basics about your storage options like RAID 5, RAID 10, solid state drives, and why your biggest bottleneck might be a $5 cable. No storage experience required.
 Session 03 Jonathan Kehayias
Jonathan Kehayias is a Senior Consultant with SQLskills, the youngest MCM for SQL Server 2008 and has been a SQL Server MVP for many years. Jonathan blogs on SQLskills.com, tweets as @SQLPoolBoy, and is an expert on Extended Events.
Presenting: DIVING INTO EXTENDED EVENTS. Extended Events provide information about the operations of SQL Server that have never before been available. Close the learning gap between Extended Events and SQL Trace.
 Session 04 Peter Myers
Peter Myers is a highly experienced consultant, trainer, mentor and presenter specializing in Microsoft Business Intelligence.
Presenting: EXPLORING POWERPIVOT FOR EXCEL IN SQL SERVER PROJECT "DENALI". Peter Myers explores the new design experience and modelling features available in PowerPivot for Excel in the upcoming release of SQL Server Project “Denali”.
 Session 05 Aaron Nelson
Aaron Nelson is a Senior SQL Server Architect who holds certifications for MCITP: Business Intelligence Developer, Database Administrator, Database Developer; as well as MCTS: Windows Server Virtualization, Configuration (meaning Hyper-V).
Presenting: WHY POWERSHELL? Windows PowerShell is rapidly becoming the go-to scripting choice of System Administrators, but what does that mean for SQL Server DBAs? We'll explore PowerShell and demonstrate how and why DBAs should use it.
 Session 06 Andy Leonard
Andy Leonard is a consultant and trainer with Linchpin People, LLC. He is active in the SQL Server Community, co-CSO of SQLPeople.net, and co-author of several books on SQL Server and Integration Services.
Presenting: SSIS IN THE ENTERPRISE. Learn key components of an SSIS Framework to facilitate SSIS development that performs and is manageable in the modern enterprise.
 Session 07 Gail Shaw
Gail Shaw is a SQL MVP from Johannesburg, South Africa, specializing in performance tuning and database optimization.
Presenting: EXTRACTING EXECUTION PLANS. This session will cover assorted ways of obtaining query execution plans from SQL Server.
 Session 08 Allan Hirt
Clustering MVP Allan Hirt is a consultant, published author, speaker, and trainer who has used SQL Server since 1992. Allan travels all over the world to work with and train clients. His most recent book is "Pro SQL Server 2008 Failover Clustering".
Presenting: MULTI-SITE FAILOVER CLUSTERING WITH SQL SERVER 2008, 2008 R2, and DENALI. Learn how to plan a multi-site cluster deployment for SQL Server 2008, 2008 R2, and Denali.
 Session 09 Stacia Misner + Denny Cherry
Stacia Misner and Denny Cherry are Microsoft MVPs with 25 years IT experience between them; Stacia focuses on the BI side and Denny focuses on the core engine side. Between them they have written 14 books and hundreds of articles.
Presenting: SO HOW DOES THE BI WORKLOAD IMPACT THE DB ENGINE? In this session, we review the architecture of SQL Server and its BI components and deployment options for optimal performance. We'll also discuss how day-to-day BI operations impact the database engine.
 Session 10 Maciej Pilecki
Maciej Pilecki is a SQL Server MVP, Microsoft Certified Master in SQL Server 2008, Microsoft Certified Trainer and Senior Consultant with Project Botticelli. He is passionate about the internals of the SQL Server database engine, Storage Engine and Query Optimizer, and Performance Tuning.
Presenting: SECRETS OF THE SQLOS. This session will explore a mysterious component of Microsoft SQL Server: its own internal built-in operating system, or SQLOS.
 Session 11 Glenn Berry
Glenn works as a Database Architect at Avalara in Denver, CO. He is a SQL Server MVP, and Adjunct Faculty member at University College - University of Denver.
Presenting: HARDWARE 301: DIVING DEEPER INTO DATABASE HARDWARE. Making the right hardware selection decisions is very important for database scalability. Having properly sized and configured hardware can both increase application performance reduce capital expenses.
 Session 12 Grant Fritchey
Grant Fritchey: Red Gate Software Product Evangelist, Author, MVP, Consultant, Speaker, Blogger, a Scary DBA.
Presenting: ALL ABOUT EXECUTION PLANS: READING EXECUTION PLANS. This session introduces the basics of reading execution plans. Learn where to start and how to proceed when reading your own plans.
 Session 13 Adam Jorgensen
Adam Jorgensen, President of Pragmatic Works, SQL MVP and SSAS Maestro co-course director is focused on democratizing SQL Server technology. He mentors executive teams & drives towards this goal designing & delivering world-class solutions.
Presenting: ZERO TO CUBE - FAST TRACK TO SSAS DEVELOPMENT. Attendees will learn how to drive and build an Analysis Services cube and reports as they rotate through the podium as volunteers.
 Session 14 Rob Farley
Rob Farley (MVP and MCT) runs Australian consultancy LobsterPot Solutions. He is hosting a pre-conference seminar at the PASS Summit 2011, showing ways that a better understanding of Advanced T-SQL features can be used to fix queries.
Presenting: FIXING QUERIES WITH UNIQUENESS. In my pre-con seminar, Fixing Queries through Advanced T-SQL Techniques, I’ll be looking at ways you can make your queries run faster. In this 24HOP session I'll be looking at Uniqueness, and the impact that this can have.
 Session 15 Edwin Sarmiento
Edwin Sarmiento is a SQL Server DBA/Windows Engineer for Pythian, a global remote DBA services provider. He is very passionate about technology but has interests in music, professional and organizational development, leadership and management matters.
Presenting: DISASTER RECOVERY IS NOT JUST ABOUT TECHNOLOGY. This session will describe the principles that should drive disaster recovery strategies and how they need to become the foundation of the technology solutions that you need to implement.
 Session 16 Jes Borland
Jes Schultz Borland is a Database Administrator at Kimberly Clark. She holds an AAS - Programmer/Analyst degree. She has worked with SQL Server since 2007, focusing on Reporting Services and day-to-day administration.
Presenting: RERPORTING SERVICES 201: FROM BASIC TO WOW! You have solid, reliable reports that you and others depend on. Learn how to take them from basic to "wow", using features such as tablix, lists, images, and charts.
 Session 17 Karen Lopez
Karen Lopez has 20+ years of data architecture experience on large, multi-project programs. A new SQL Server MVP, she wants you to love your data.
Presenting: 5 PHYSICAL DATABASE DESIGN BLUNDERS & HOW TO AVOID THEM. Mistakes can cost you dearly: performance snags, development delays and bugs. Learn how to: find blunders, get tips on how to avoid them, talk about and defend design recommendations.
 Session 18 Adam Machanic
Adam Machanic is a Boston-based independent database consultant, writer, and speaker. He has written for numerous web sites, magazines, and books. He loves performance monitoring and shortening his bio for the sake of LiveMeeting.
Presenting: BASELINE BASICS OR WHO BROKE THE DATABASE. Does the server seem a bit sluggish today? Is a quick glance at performance counters not revealing any obvious culprit? Where should you go next?
 Session 19 Audrey Hammonds
Audrey Hammonds is a BI Consultant for Key2 Consulting and one half of the Datachix (www.datachix.com). She holds MCTS certifications in SQL Server 2008 Database Development and SQL Server 2008 Business Intelligence.
Presenting: T-SQL AWESOMENESS: 3 WAYS TO WRITE COOL SQL. There are some truly awesome ways to make your data do just what you need it to do, while improving performance and/or readability. Come learn new-school ways to expand your T-SQL repertoire.
 Session 20 Don Kiely
Don Kiely is a technology consultant and database application developer in Fairbanks, Alaska. donkiely@computer.org
Presenting: CODE-FIRST DEVELOPMENT WITH THE ENTITY FRAMEWORK. Code-first development in Entity Framework is a new feature of version 4.1, based on custom .NET classes. Define your objects then let EF create the database. This session explores this great new feature.
 Session 21 Simon Sabin
Simon Sabin is a principal consultant for SQLKnowHow who specialize in the high perf/big data SQL Server systems. His focus is troubleshooting and mentoring teams responsible for such systems. He is a SQL Server MVP and MCM and is the founder of SQLBits.
Presenting: ADVANCED REPORTING SERVICES. Slicers are an interactivity feature available in Excel and Crescent. Learn to use features such as multi valued parameters, expression formatting and custom code to show you how to add slicers to reporting services reports.
 Session 22 Victor Isakov
Victor Isakov (MCA, MCM, MCT, MVP) is a Database Architect and Trainer who provides consulting and training services to various organizations in the public, private and NGO sectors globally. He regularly speaks at international conferences and has authored a number of books on SQL Server.
Presenting: IMPORTANT TRACE FLAGS THAT EVERY DBA SHOULD KNOW. In this session, Victor Isakov will present the important trace flags that all DBAs should know, what they do, when to implement them and how best to implement them in a production environment.
 Session 23 Jorge Segarra
Jorge Segarra is a DBA-turned-BI Consultant for Pragmatic Works consulting, SQL Server MVP, and a Regional Mentor for PASS. He is the founder of SQL University which can be found at his blog, http://sqlchicken.com.
Presenting: POLICY-BASED MANAGEMENT IN A NUTSHELL. Discover Policy-Based Management, a powerful and easy-to-configure feature added in SQL Server 2008. Learn how to set these up in your own shops, set up an elegant (and free) reporting solution, and much, much more!
 Session 24 Paul Turley
Paul Turley is a Mentor for SolidQ and a SQL Server MVP who has been architecting, managing and developing applications and business intelligence solutions for large and small businesses since 1992. He holds the current MCTS and MCITP certifications for SQL Server BI.
Presenting: VISUAL REPORT DESIGN: BRINGING SEXY BACK. BI is all the rage but you don’t have to invest in an entire BI platform to have fresh, usable reports. Learn design techniques applicable to enterprise analytic solutions and smaller-scale operational reporting.

Happy Learning

Sudhir