<ul><li>Technical Integration Department </li></ul><ul><li>System Analysis & Training Group </li></ul><ul><li>Jerry Yang <...
<ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul...
<ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul...
<ul><li>What Is DB Tuning ? </li></ul><ul><ul><li>Hardware Part </li></ul></ul><ul><ul><li>Software Part </li></ul></ul><u...
<ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul...
<ul><li>SQL Server Managers </li></ul>SQL Server 2000 Index Analyzing Query Executer
<ul><li>Eight Types of Disk Pages </li></ul><ul><ul><li>Bulk Changed Map Pages </li></ul></ul><ul><ul><li>Data Pages </li>...
<ul><li>Eight Types of Disk Pages </li></ul><ul><ul><li>Bulk Changed Map Pages </li></ul></ul><ul><ul><li>Data Pages </li>...
<ul><li>Concept of B-Tree </li></ul><ul><ul><li>Three Kinds of Nodes </li></ul></ul><ul><ul><ul><li>Root Node </li></ul></...
<ul><li>SQL Server Index Types </li></ul><ul><ul><li>Clustered Index </li></ul></ul><ul><ul><li>─   Please See Example  ─ ...
SELECT  *  FROM People  WHERE  ID = 3 ID Name Sex City 1 2 3 4 Alex John Bill Mary M M M F Taipei Tainan Keelung Taipei Ta...
<ul><li>SQL Server Index Types </li></ul><ul><ul><li>Non-Clustered Index </li></ul></ul><ul><ul><li>─   Please See Example...
Bookmarks SELECT  *  FROM People  WHERE  Name = ‘Bill’ ID Name Sex City 1 2 3 4 Alex John Bill Mary M M M F Taipei Tainan ...
ID Name Sex City 1 2 3 4 Alex John Bill Mary M M M F Taipei Tainan Keelung Taipei Table Name: People Clustered Index: ID N...
<ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul...
<ul><li>Index Creation Tips </li></ul><ul><ul><li>Frequency (Where, Order By, Group By) </li></ul></ul><ul><ul><li>Selecti...
<ul><li>Query Design Tips </li></ul><ul><ul><li>Use Index </li></ul></ul><ul><ul><ul><li>Ex: Column Employee_ID is used to...
<ul><li>Query Design Tips (Cont.) </li></ul><ul><ul><li>Avoid To Use Function In WHERE Clause </li></ul></ul><ul><ul><ul><...
<ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul...
<ul><li>What Do You Need To Know Today… </li></ul><ul><ul><li>Something About DB Tuning </li></ul></ul><ul><ul><li>Analysi...
<ul><li>Fundamentals of Database Systems </li></ul><ul><ul><li>Author:   Elmasri / Navathe </li></ul></ul><ul><ul><li>Publ...
Any Question?
Upcoming SlideShare
Loading in …5
×

SQL Server 2000 Research Series - Performance Tuning

1,369 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

SQL Server 2000 Research Series - Performance Tuning

  1. 1. <ul><li>Technical Integration Department </li></ul><ul><li>System Analysis & Training Group </li></ul><ul><li>Jerry Yang </li></ul><ul><li>November 11, 2005 </li></ul>SQL Server 2000 Research Series Performance Tuning
  2. 2. <ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul><ul><li>Summary </li></ul>Agenda
  3. 3. <ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul><ul><li>Summary </li></ul>Performance Tuning
  4. 4. <ul><li>What Is DB Tuning ? </li></ul><ul><ul><li>Hardware Part </li></ul></ul><ul><ul><li>Software Part </li></ul></ul><ul><li>Why It Is So Important ? </li></ul><ul><ul><li>Case Study 1. General Nutrition Companies </li></ul></ul><ul><ul><li>Case Study 2. SYSCOM </li></ul></ul><ul><ul><li>Case Study 3. GSS </li></ul></ul>Introduction
  5. 5. <ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul><ul><li>Summary </li></ul>Performance Tuning
  6. 6. <ul><li>SQL Server Managers </li></ul>SQL Server 2000 Index Analyzing Query Executer
  7. 7. <ul><li>Eight Types of Disk Pages </li></ul><ul><ul><li>Bulk Changed Map Pages </li></ul></ul><ul><ul><li>Data Pages </li></ul></ul><ul><ul><li>Differential Changed Map Pages </li></ul></ul><ul><ul><li>Global Allocation Map (GAM & SGAM) Pages </li></ul></ul><ul><ul><li>Index Allocation Map (IAM) Pages </li></ul></ul><ul><ul><li>Index Pages </li></ul></ul><ul><ul><li>Page Free Space (PFS) Pages </li></ul></ul><ul><ul><li>Text/Image Pages </li></ul></ul>SQL Server 2000 Index Analyzing
  8. 8. <ul><li>Eight Types of Disk Pages </li></ul><ul><ul><li>Bulk Changed Map Pages </li></ul></ul><ul><ul><li>Data Pages </li></ul></ul><ul><ul><li>Differential Changed Map Pages </li></ul></ul><ul><ul><li>Global Allocation Map (GAM & SGAM) Pages </li></ul></ul><ul><ul><li>Index Allocation Map (IAM) Pages </li></ul></ul><ul><ul><li>Index Pages </li></ul></ul><ul><ul><li>Page Free Space (PFS) Pages </li></ul></ul><ul><ul><li>Text/Image Pages </li></ul></ul>SQL Server 2000 Index Analyzing
  9. 9. <ul><li>Concept of B-Tree </li></ul><ul><ul><li>Three Kinds of Nodes </li></ul></ul><ul><ul><ul><li>Root Node </li></ul></ul></ul><ul><ul><ul><li>Intermediate Nodes </li></ul></ul></ul><ul><ul><ul><li>Leaf Nodes </li></ul></ul></ul><ul><ul><li>Pointer </li></ul></ul><ul><ul><li>Data </li></ul></ul><ul><ul><ul><li>Bookmark </li></ul></ul></ul><ul><ul><ul><li>Real Data </li></ul></ul></ul>SQL Server 2000 Index Analyzing
  10. 10. <ul><li>SQL Server Index Types </li></ul><ul><ul><li>Clustered Index </li></ul></ul><ul><ul><li>─ Please See Example ─ </li></ul></ul>SQL Server 2000 Index Analyzing
  11. 11. SELECT * FROM People WHERE ID = 3 ID Name Sex City 1 2 3 4 Alex John Bill Mary M M M F Taipei Tainan Keelung Taipei Table Name: People Clustered Index: ID Non-Clustered Index: Name
  12. 12. <ul><li>SQL Server Index Types </li></ul><ul><ul><li>Non-Clustered Index </li></ul></ul><ul><ul><li>─ Please See Example ─ </li></ul></ul>SQL Server 2000 Index Analyzing
  13. 13. Bookmarks SELECT * FROM People WHERE Name = ‘Bill’ ID Name Sex City 1 2 3 4 Alex John Bill Mary M M M F Taipei Tainan Keelung Taipei Table Name: People Clustered Index: ID Non-Clustered Index: Name
  14. 14. ID Name Sex City 1 2 3 4 Alex John Bill Mary M M M F Taipei Tainan Keelung Taipei Table Name: People Clustered Index: ID Non-Clustered Index: Name
  15. 15. <ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul><ul><li>Summary </li></ul>Performance Tuning
  16. 16. <ul><li>Index Creation Tips </li></ul><ul><ul><li>Frequency (Where, Order By, Group By) </li></ul></ul><ul><ul><li>Selectivity </li></ul></ul><ul><ul><li>Indexed Column Size (Integer, Character) </li></ul></ul><ul><ul><li>OLTP (Online Transaction Processing) & </li></ul></ul><ul><ul><li>OLAP (Online Analytical Processing) </li></ul></ul>The Way to Achieve Goal
  17. 17. <ul><li>Query Design Tips </li></ul><ul><ul><li>Use Index </li></ul></ul><ul><ul><ul><li>Ex: Column Employee_ID is used to define an index. </li></ul></ul></ul><ul><ul><ul><li>The Statement “… WHERE Employee_ID >= 50” will use this index. </li></ul></ul></ul><ul><ul><li>Use “>=” And “<=” To Replace… </li></ul></ul><ul><ul><ul><li>BETWEEN … AND … </li></ul></ul></ul><ul><ul><ul><li><> , != </li></ul></ul></ul><ul><ul><li>Avoid To Use Calculation In WHERE Clause </li></ul></ul><ul><ul><ul><li>Ex: WHERE Last_Name + First_Name = ‘George Bush’ </li></ul></ul></ul>The Way to Achieve Goal
  18. 18. <ul><li>Query Design Tips (Cont.) </li></ul><ul><ul><li>Avoid To Use Function In WHERE Clause </li></ul></ul><ul><ul><ul><li>Ex: WHERE ABS(Account_Money) >= 50000 </li></ul></ul></ul><ul><ul><li>Follow SQL Server’s Decision </li></ul></ul>The Way to Achieve Goal
  19. 19. <ul><li>Introduction </li></ul><ul><li>SQL Server 2000 Index Analyzing </li></ul><ul><li>The Way to Achieve Goal </li></ul><ul><li>Summary </li></ul>Performance Tuning
  20. 20. <ul><li>What Do You Need To Know Today… </li></ul><ul><ul><li>Something About DB Tuning </li></ul></ul><ul><ul><li>Analysis of Index </li></ul></ul><ul><ul><ul><li>B-Tree </li></ul></ul></ul><ul><ul><ul><li>Pages </li></ul></ul></ul><ul><ul><ul><li>Clustered Index </li></ul></ul></ul><ul><ul><ul><li>Non-Clustered Index </li></ul></ul></ul><ul><ul><li>Index & Query Design Tips </li></ul></ul>Summary
  21. 21. <ul><li>Fundamentals of Database Systems </li></ul><ul><ul><li>Author: Elmasri / Navathe </li></ul></ul><ul><ul><li>Publisher: Addison-Wesley Publishing Company </li></ul></ul><ul><li>Inside of Microsoft SQL Server 2000 </li></ul><ul><ul><li>Author: Kalen Delaney </li></ul></ul><ul><ul><li>Publisher: Microsoft Press </li></ul></ul>Reference
  22. 22. Any Question?

×