rubicon44TechBlog
    Search by

    Performance Design.

    created_at:September 03, 2022

    updated_at:September 03, 2022

    Today, I am going to explain physical design process.

    Purposes of this article creation

    • To be able to create DB tables in MySQL in Ruby on Rails on my own.
    • To be able to do physical design.

    Performance Design Process

    In this case, I will create physical data model for a SNS task management application on Cacoo as a deliverable.

    【What is Performance Design?】

    • Performance Design is about overall database performance, such as data response time. Performance tuning is performed to meet the performance defined in the requirements specification and so on.
    • Performance tuning is to devise ways to speed up DBMS access.
    • A typical example is SQL performance tuning, which aims to increase speed by improving the way SQL is written, but there are various other methods.

    Performance Design

    【Determine the required performance】
    ※For new development, first create a prototype and conduct load testing before determining both capacity and performance. Then, performance tuning is performed to meet the necessary performance requirements.

    Performance Tuning Methods

    • Denormalization, Adding Derived Attributes
    • Index Creation
    • SQL Performance Tuning
    • Reduce Transaction Isolation Levels
    • Partitioning, Disk Distribution

    ※Changing the way SQL is written and the table structure makes a big difference in performance.

    ※It is important to optimize indexes, and an optimizer is used for this purpose.

    Denormalization, Adding Derived Attributes

    • If a table is normalized, it must be joined when it is used. Since this can cause a drop in performance, processing speed is a priority and a table may not be normalized.

    Index Creation

    • Creating indexes can speed up DB access. However, depending on the amount of data and update frequency, using indexes may actually slow down the process, so it is important to design indexes appropriately.
    • To optimize indexes, use optimizers (software for optimization), etc.

    SQL Performance Tuning

    • The way SQL is written can make a difference in performance.
    • For example, the IN and EXISTS clauses used in the subquery syntax often differ in performance, even when the process returns the same results.

    Reduce Transaction Isolation Levels

    • The higher the transaction isolation level, the more consistent it is, but the worse the performance.
    • When performance is required, it is possible to improve overall transaction throughput by purposely lowering the isolation level.

    Partitioning, Disk Distribution

    • Performance can be improved by distributing data to multiple locations to avoid database access concentration.
    • This can be done by logically partitioning or physically distributing disks.

    Deliverables(Physical Data Model)

    • URL:NONE.

    References

    Word Explanation

    NONE.

    Summary/What I learned this time

    【Summary】
    First create a prototype and conduct load testing before determining both capacity and performance. Then, performance tuning is performed to meet the necessary performance requirements.

    【What I learned this time】
    NONE.

    © 2022, rubicon44TechBlog All rights reserved.