SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Boosting Your Database Performance Using
 SQL Server Indexes & SSAS Aggregations



             Andre Magni, ME
     MCT, MCITP, MCPD, MSF Practitioner
             Training Manager
Agenda

 Indexes Strategy
 •   Data structure – HEAP
 •   CLUSTURED Indexes
 •   NONCLUSTURED Indexes
 •   More on Indexes
 •   Best Practices
 SSAS Aggregations
 • New Aggregation Designer
 • Best Practices
Agenda

 Indexes Strategy
 •   Data structure – HEAP
 •   CLUSTURED Indexes
 •   NONCLUSTURED Indexes
 •   More on Indexes
 •   Best Practices
 SSAS Aggregations
 • New Aggregation Designer
 • Best Practices
Data Structure – HEAP

 Table with NO CLUSTURED index
 First IAM Page
  No particular order on the other pages




          HEAP
Data Structure – HEAP

 DEMO
CLUSTURED Index

 B-Tree – leaf level = data pages
 One per table               Root Page (2)




         Non Leaf
         Level (1)

         Leaf
         Level (0)
CLUSTURED Index

 DEMO
NONCLUSTURED Index

 B-Tree: leaf level  data pages (HEAP) or
 CLUSTURED Index
                            Root Page (1)
 249 per table

        Leaf
        Level (0)


 HEAP                         Non Leaf
                              Level (1)


                              Leaf
                              Level (0)
NONCLUSTURED Index

 DEMO
More on Indexes

 Query coverage with indexes:
 • Execution plan
 • Included columns
 Indexed views:
 • Will materialize your view – 1st index must be an
   unique clustured
 • Some restrictions apply
    • Create WITH SCHEMABINDING
    • CANNOT have: TOP, UNION, ORDER BY, Subqueries, …
More on Indexes

 Partitioned indexes:
 • Partitioned tables


 Filtered indexes:
 • WHERE clause on the index
    • Lots of NULLs (SPARSE)
    • UNIQUE INDEX on not NULLs for example
    • Ranges
More on Index

 DEMO
More on Indexes

 Index Fragmentation
 • Detect: sys.dm_db_index_physical_stats
 • Fragmentation < 30%  ALTER … REORGANIZE
 • Fragmentation > 30%  ALTER … REBUILD

 Online Index Building
 • Default behavior: exclusive lock on the index
 • Two copies
    • Source: queries will read from here
    • Target: writes are taking place here
Best Practices

 CLUSTURED
  • USE
    •   Range queries
    •   Primary key queries
  • DO NOT USE
    •   Columns that have frequent changes
    •   Wide keys
 NONCLUSTURED
  • USE
    • Predicates
    • Joins
    • Aggregation
    • Cover queries
Best Practices

 Use FILL Factor and Pad Indexes accordingly
 Use partitioned indexes with partitioned
 tables
  • Or at least filtered indexes when appropriate
 Use INCLUDE
 Keep key size to a minimum
Agenda

 Indexes Strategy
 •   Data structure – HEAP
 •   CLUSTURED Indexes
 •   NONCLUSTURED Indexes
 •   More on Indexes
 •   Best Practices
 SSAS Aggregations
 • New Aggregation Designer
 • Best Practices
SSAS Aggregations

 Pre-calculated subtotals stored in either an
 OLAP or relational format
 Improve performance getting data out
 New Aggregation Designer on SQL 2008
  • For 2005: download Aggregation Manager from
    codeplex
SSAS Agregations

 DEMO
Best Practices

     Aggregation size between 10 and 30% of the
     fact table
     When in doubt use Usage based aggregation
     design




19
Q&A
Thank you!



     Andre Magni
amagni@springhouse.com
Stay Connected with Springhouse

            www.linkedin.com/companies/201280



            www.facebook.com/springhouseeducation



            www.twitter.com/SpringhouseEduc

            Join in the conversation
            Philly TechFest hashtag #phtf10
Upcoming iLearn Topics
Spend an hour over lunch (12pm – 1pm ET) with a
live presentation and demonstration of topics         What's New in Microsoft   5/17/2010
                                                      Office 2010
such as:
•   SharePoint Document Libraries                     An Overview of ITIL       5/20/2010
•   Project 2007/Project Management Tips & Tricks     IIS 7.0 for Developers    6/1/2010
•   Windows 7 for IT Pros
•   Office 2007 and Office 2010                       Project Management Tips   6/14/2010
•   and many more                                     and Tricks
                                                      Common Tasks with         6/24/2010
Just visit www.Springhouse.com/iLearn to learn more   PowerShell
and register for a FREE webcast!                      Microsoft Excel 2007:     6/28/2010
                                                      Tips and Tricks
There is no need to travel to take a live,
instructor-led class with Springhouse. You
can stay at home or at your office and join
a class via Springhouse CONNECT, our
Remote Learning System.
•    Participate in the live instructor-led classroom
     demonstrations and labs
•    Interact with the instructor and students, via
     high-quality conferencing equipment
•    View the Instructor's Presentation, Whiteboard
     and Demonstrations
•    Get remote hands-on help from the Instructor
     during labs and demos


    Take ANY class via Springhouse CONNECT. Learn
    more at www.Springhouse.com/CONNECT
Buy 2 Classes, Get 1 Free! Or Buy 1 Class, Get 2nd for Half Price!
What’s In It For Me?                               Springhouse is making it easier for you and
• You’ll Gain New Skills!                          your organization to gain new skills and
• You’ll Save Money!                               increase productivity while maximizing your
                                                   budget.
• You’ll Increase Your Productivity!
                                                   For full details of the program visist
How Do I Take Advantage?                           www.Springhouse.com/Summer-of-Learning
Visit www.Springhouse.com and select any course
scheduled to run between May 31, 2010 and
September 6, 2010.

Enroll in the course using
Promo Code: SUMMER2010
A Springhouse representative will contact you to
register for the other discounted course.
Upcoming Windows 7 Migration Clinics
Exton, PA – May 13th                      Event Overview
Malvern, PA – June 29th
Reston, VA - May 14th                     This one-day Windows 7 Migration
Richmond, VA – June 2nd & 11th            Clinic dives deep into the migration
Washington, DC – June 30th                and deployment planning strategies
                                          for Windows 7. Through a series of
                                          in-depth presentations and exercise
For full event details and registration
                                          demonstrations, we will highlight the
visit www.springhouse.com/events          new tools and technologies designed
                                          to enable successful Windows 7
                                          migrations and deployments.

Contenu connexe

Similaire à Philly TechFest SQL Indexes

Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionAnne Grundhoefer
 
Developer Night - Opticon18
Developer Night - Opticon18Developer Night - Opticon18
Developer Night - Opticon18Optimizely
 
Why the database is at the heart of DevOps success
Why the database is at the heart of DevOps successWhy the database is at the heart of DevOps success
Why the database is at the heart of DevOps successRed Gate Software
 
OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1Beth Warner
 
Excel Workshop- Susapta
Excel Workshop- SusaptaExcel Workshop- Susapta
Excel Workshop- SusaptaAyojak
 
Movin’ On Up - A #SharePoint Migration Case Study #HSPUG
Movin’ On Up - A #SharePoint Migration Case Study #HSPUGMovin’ On Up - A #SharePoint Migration Case Study #HSPUG
Movin’ On Up - A #SharePoint Migration Case Study #HSPUGJim Adcock
 
Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...
Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...
Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...OutSystemsNeo
 
Best Practices and Lessons Learned on Our IBM Rational Insight Deployment
Best Practices and Lessons Learned on Our IBM Rational Insight DeploymentBest Practices and Lessons Learned on Our IBM Rational Insight Deployment
Best Practices and Lessons Learned on Our IBM Rational Insight DeploymentMarc Nehme
 
Movin’ On Up - SP Engage Oct 2015
Movin’ On Up - SP Engage Oct 2015Movin’ On Up - SP Engage Oct 2015
Movin’ On Up - SP Engage Oct 2015Jim Adcock
 
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User GroupSeatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User GroupRussell Spangler
 
Advance Data Analysis & Database
Advance Data Analysis & DatabaseAdvance Data Analysis & Database
Advance Data Analysis & DatabaseAhmed Yasir Khan
 
OLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day OneOLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day OneBeth Warner
 
Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches
Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches
Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches Rui Romano
 

Similaire à Philly TechFest SQL Indexes (20)

Philly Tech Fest Publishing
Philly Tech Fest PublishingPhilly Tech Fest Publishing
Philly Tech Fest Publishing
 
Philly Tech Fest Exchange Server 2008 High Availability
Philly Tech Fest Exchange Server 2008 High AvailabilityPhilly Tech Fest Exchange Server 2008 High Availability
Philly Tech Fest Exchange Server 2008 High Availability
 
Philly Tech Fest Office 2010 And Share Point 2010
Philly Tech Fest Office 2010 And Share Point 2010Philly Tech Fest Office 2010 And Share Point 2010
Philly Tech Fest Office 2010 And Share Point 2010
 
Philly TechFest Systems Center Essentials 2010
Philly TechFest Systems Center Essentials 2010Philly TechFest Systems Center Essentials 2010
Philly TechFest Systems Center Essentials 2010
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX Evolution
 
powerDay2bi
powerDay2bipowerDay2bi
powerDay2bi
 
Developer Night - Opticon18
Developer Night - Opticon18Developer Night - Opticon18
Developer Night - Opticon18
 
Why the database is at the heart of DevOps success
Why the database is at the heart of DevOps successWhy the database is at the heart of DevOps success
Why the database is at the heart of DevOps success
 
OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1
 
Excel Workshop- Susapta
Excel Workshop- SusaptaExcel Workshop- Susapta
Excel Workshop- Susapta
 
Technix-Pro Sas certified base programmer
Technix-Pro Sas certified base programmerTechnix-Pro Sas certified base programmer
Technix-Pro Sas certified base programmer
 
Movin’ On Up - A #SharePoint Migration Case Study #HSPUG
Movin’ On Up - A #SharePoint Migration Case Study #HSPUGMovin’ On Up - A #SharePoint Migration Case Study #HSPUG
Movin’ On Up - A #SharePoint Migration Case Study #HSPUG
 
Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...
Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...
Advanced Bootstrapping and Integrations - Chennai OutSystems User Group 27th ...
 
Best Practices and Lessons Learned on Our IBM Rational Insight Deployment
Best Practices and Lessons Learned on Our IBM Rational Insight DeploymentBest Practices and Lessons Learned on Our IBM Rational Insight Deployment
Best Practices and Lessons Learned on Our IBM Rational Insight Deployment
 
Movin’ On Up - SP Engage Oct 2015
Movin’ On Up - SP Engage Oct 2015Movin’ On Up - SP Engage Oct 2015
Movin’ On Up - SP Engage Oct 2015
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User GroupSeatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
 
Advance Data Analysis & Database
Advance Data Analysis & DatabaseAdvance Data Analysis & Database
Advance Data Analysis & Database
 
OLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day OneOLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day One
 
Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches
Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches
Top 10 of Data & BI Summit Series: Power BI Tips & Tricks from the Trenches
 

Dernier

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Dernier (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Philly TechFest SQL Indexes

  • 1. Boosting Your Database Performance Using SQL Server Indexes & SSAS Aggregations Andre Magni, ME MCT, MCITP, MCPD, MSF Practitioner Training Manager
  • 2. Agenda Indexes Strategy • Data structure – HEAP • CLUSTURED Indexes • NONCLUSTURED Indexes • More on Indexes • Best Practices SSAS Aggregations • New Aggregation Designer • Best Practices
  • 3. Agenda Indexes Strategy • Data structure – HEAP • CLUSTURED Indexes • NONCLUSTURED Indexes • More on Indexes • Best Practices SSAS Aggregations • New Aggregation Designer • Best Practices
  • 4. Data Structure – HEAP Table with NO CLUSTURED index First IAM Page  No particular order on the other pages HEAP
  • 5. Data Structure – HEAP DEMO
  • 6. CLUSTURED Index B-Tree – leaf level = data pages One per table Root Page (2) Non Leaf Level (1) Leaf Level (0)
  • 8. NONCLUSTURED Index B-Tree: leaf level  data pages (HEAP) or CLUSTURED Index Root Page (1) 249 per table Leaf Level (0) HEAP Non Leaf Level (1) Leaf Level (0)
  • 10. More on Indexes Query coverage with indexes: • Execution plan • Included columns Indexed views: • Will materialize your view – 1st index must be an unique clustured • Some restrictions apply • Create WITH SCHEMABINDING • CANNOT have: TOP, UNION, ORDER BY, Subqueries, …
  • 11. More on Indexes Partitioned indexes: • Partitioned tables Filtered indexes: • WHERE clause on the index • Lots of NULLs (SPARSE) • UNIQUE INDEX on not NULLs for example • Ranges
  • 13. More on Indexes Index Fragmentation • Detect: sys.dm_db_index_physical_stats • Fragmentation < 30%  ALTER … REORGANIZE • Fragmentation > 30%  ALTER … REBUILD Online Index Building • Default behavior: exclusive lock on the index • Two copies • Source: queries will read from here • Target: writes are taking place here
  • 14. Best Practices CLUSTURED • USE • Range queries • Primary key queries • DO NOT USE • Columns that have frequent changes • Wide keys NONCLUSTURED • USE • Predicates • Joins • Aggregation • Cover queries
  • 15. Best Practices Use FILL Factor and Pad Indexes accordingly Use partitioned indexes with partitioned tables • Or at least filtered indexes when appropriate Use INCLUDE Keep key size to a minimum
  • 16. Agenda Indexes Strategy • Data structure – HEAP • CLUSTURED Indexes • NONCLUSTURED Indexes • More on Indexes • Best Practices SSAS Aggregations • New Aggregation Designer • Best Practices
  • 17. SSAS Aggregations Pre-calculated subtotals stored in either an OLAP or relational format Improve performance getting data out New Aggregation Designer on SQL 2008 • For 2005: download Aggregation Manager from codeplex
  • 19. Best Practices Aggregation size between 10 and 30% of the fact table When in doubt use Usage based aggregation design 19
  • 20. Q&A
  • 21. Thank you! Andre Magni amagni@springhouse.com
  • 22. Stay Connected with Springhouse www.linkedin.com/companies/201280 www.facebook.com/springhouseeducation www.twitter.com/SpringhouseEduc Join in the conversation Philly TechFest hashtag #phtf10
  • 23. Upcoming iLearn Topics Spend an hour over lunch (12pm – 1pm ET) with a live presentation and demonstration of topics What's New in Microsoft 5/17/2010 Office 2010 such as: • SharePoint Document Libraries An Overview of ITIL 5/20/2010 • Project 2007/Project Management Tips & Tricks IIS 7.0 for Developers 6/1/2010 • Windows 7 for IT Pros • Office 2007 and Office 2010 Project Management Tips 6/14/2010 • and many more and Tricks Common Tasks with 6/24/2010 Just visit www.Springhouse.com/iLearn to learn more PowerShell and register for a FREE webcast! Microsoft Excel 2007: 6/28/2010 Tips and Tricks
  • 24. There is no need to travel to take a live, instructor-led class with Springhouse. You can stay at home or at your office and join a class via Springhouse CONNECT, our Remote Learning System. • Participate in the live instructor-led classroom demonstrations and labs • Interact with the instructor and students, via high-quality conferencing equipment • View the Instructor's Presentation, Whiteboard and Demonstrations • Get remote hands-on help from the Instructor during labs and demos Take ANY class via Springhouse CONNECT. Learn more at www.Springhouse.com/CONNECT
  • 25. Buy 2 Classes, Get 1 Free! Or Buy 1 Class, Get 2nd for Half Price! What’s In It For Me? Springhouse is making it easier for you and • You’ll Gain New Skills! your organization to gain new skills and • You’ll Save Money! increase productivity while maximizing your budget. • You’ll Increase Your Productivity! For full details of the program visist How Do I Take Advantage? www.Springhouse.com/Summer-of-Learning Visit www.Springhouse.com and select any course scheduled to run between May 31, 2010 and September 6, 2010. Enroll in the course using Promo Code: SUMMER2010 A Springhouse representative will contact you to register for the other discounted course.
  • 26. Upcoming Windows 7 Migration Clinics Exton, PA – May 13th Event Overview Malvern, PA – June 29th Reston, VA - May 14th This one-day Windows 7 Migration Richmond, VA – June 2nd & 11th Clinic dives deep into the migration Washington, DC – June 30th and deployment planning strategies for Windows 7. Through a series of in-depth presentations and exercise For full event details and registration demonstrations, we will highlight the visit www.springhouse.com/events new tools and technologies designed to enable successful Windows 7 migrations and deployments.