Top Banner

of 23

Lecture03 Monitoring and Tuning the Operational System Ch19

Jun 03, 2018

Download

Documents

SinFeng
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    1/23

    Chapter 19

    Methodology Monitoring and

    Tuning the Operational System

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    2/23

    2

    Chapter 19 - Objectives

    Meaning of denormalization.

    When to denormalize to improve performance.

    Importance of monitoring and tuning the

    operational system.

    How to measure efficiency.

    How system resources affect performance.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    3/23

    3

    Step 7 Consider the Introduction of

    Controlled Redundancy

    To determine whether introducing redundancy in

    a controlled manner by relaxing normalization

    rules will improve the performance of the system.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    4/23

    4

    Step 7 Consider the Introduction of

    Controlled Redundancy

    Result of normalization is a design that is

    structurally consistent with minimal redundancy.

    However, sometimes a normalized database does

    not provide maximum processing efficiency.May be necessary to accept loss of some benefits

    of a fully normalized design in favor of

    performance.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    5/23

    5

    Step 7 Consider the Introduction of

    Controlled Redundancy

    Also consider that denormalization:

    makes implementation more complex;

    often sacrifices flexibility;

    may speed up retrievals but it slows down

    updates.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    6/23

    6

    Step 7 Consider the Introduction of

    Controlled Redundancy

    Consider denormalization in following

    situations, specifically to speed up frequent or

    critical transactions:

    Step 7.1 Combining 1:1 relationships

    Step 7.2 Duplicating non-key attributes in

    1:* relationships to reduce joins

    Step 7.3 Duplicating foreign key attributesin 1:* relationships to reduce joins

    Pearson Education 2009

    Hoi cac buoc loai bo du thua

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    7/23

    7

    Step 7 Consider the Introduction of

    Controlled Redundancy

    Step 7.4 Duplicating attributes in *:*

    relationships to reduce joins

    Step 7.5 Introducing repeating groups

    Step 7.6 Creating extract tables

    Step 7.7 Partitioning relations.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    8/23

    8

    Sample Relation Diagram

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    9/23

    9

    Sample Relations

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    10/23

    10

    Step 7.1 Combining 1:1 relationships

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    11/23

    11

    Step 7.2 Duplicating non-key attributes in 1:*

    relationships to reduce joins

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    12/23

    12

    Step 7.2 Duplicating non-key attributes in

    1:* relationships: Lookup Table

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    13/23

    13

    Step 7.2 Duplicating non-key attributes in

    1:* relationships: Lookup Table

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    14/23

    14

    Step 7.3 Duplicating FK attributes in 1:*

    relationship to reduce joins

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    15/23

    15

    Step 7.4 Duplicating attributes in *:*

    relationships to reduce joins

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    16/23

    16

    Step 7.5 Introducing repeating groups

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    17/23

    17

    Step 7.6 Creating extract tables

    Reports can access derived data and perform multi-

    relation joins on same set of base relations. However,

    data the report is based on may be relatively static

    or may not have to be current.

    Possible to create a single, highly denormalized

    extract table based on relations required by reports,

    and allow users to access extract table directly

    instead of base relations.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    18/23

    18

    Step 7.7 Partitioning relations

    Rather than combining relations together,

    alternative approach is to decompose them

    into a number of smaller and more

    mannageable partitions.Two main types of partitioning: horizontal

    and vertical.

    Pearson Education 2009

    Hoi 2 loai phan nho.Dap an horizontal, vertical

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    19/23

    19

    Step 7.7 Partitioning relations

    Pearson Education 2009

    Co hinh nay! Hoi phan nhu nay la horizontal hay vertical

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    20/23

    20

    Advantages and disadvantages of

    denormalization

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    21/23

    21

    Step 8 Monitor & Tune Operational System

    To monitor operational system and improve

    performance of system to correct inappropriate

    design decisions or reflect changing requirements.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    22/23

    22

    Step 8 Monitor & Tune Operational System

    Number of factors may be used to measure efficiency:

    - Transaction throughput: number of transactions processedin given time interval.

    - Response time: elapsed time for completion of a single

    transaction.

    - Disk storage: amount of disk space required to storedatabase files.

    No one factor is always correct. Have to trade each off

    against another to achieve reasonable balance.

    Need to understand how the various hardwarecomponents interact and affect database performance.

    Pearson Education 2009

  • 8/12/2019 Lecture03 Monitoring and Tuning the Operational System Ch19

    23/23

    23

    Step 8 Monitor & Tune Operational System

    DreamHome wish to hold pictures of properties,

    and comments that describe main features of

    property.

    Pearson Education 2009

    Co hinh nay. chon dap an la monitor & Tune