DB2 Database Disk storage

Source: Internet
Author: User

one full io operation time = disk axis rotation time (rotation delay) + disk arm move time (seek time) + data transfer time. The experience value of a full IO time is 1/80 seconds, so for large databases, frequent IO operations can accumulate a negligible amount of time.  DB2 The actual database contains many logical objects and physical objects.
    1. database objects such as tables, views, indexes, schemas, triggers, stored procedures, packages, and so on.
    2. Buffer pool, log file, table space
    3. Physical storage, tablespace container, directory, file system, or bare device.
Some of these objects, such as tables or views, help determine how to organize the data, other objects (such as tablespace) involve the physical implementation of the database, and finally (such as buffer pools and other memory objects) handle how database performance is managed. Other objects, such as log files, handle the recoverability of the database.  table spaces can span many containers, which means that the operating system can break the limits of the amount of data a container can contain.  the minimum storage unit for the operating system is block, the smallest chunk in Linux is 512 bytes, in Windows, the smallest storage unit is 1KB,and the smallest thing in the database is the data page. There are several 4,8,16,32KB data pages in DB2. DB2 in writing the physical storage, in order to guarantee the write throughput, the introduction of a larger unit extent, it is an integer times the size of the datapage. The table space container is composed of many extent, and the table space is made up of many containers. So it is generally understood that multiple extent constitute a container, and multiple container are composedtable space.  three types of table spaces in DB2
    • System Management Table Space (SMS)
file System Manager with operating system allocates and manages space, generally does not need how to maintain
    • Space for database management
the DB2 Database Manager manager controls the storage space table space container to use a file system or a bare device.
    • Automatic storage of DMS
 SMS Tablespace can simplify management, cannot use bare devices, DMS table space can improve performance, can use bare devices. when using SMS Tablespace, DBAs can only store 64GB data (4kb page size) in a tablespace. DMS reaches 8TBDMS Automatic storage allows DBAs to set the storage path that can be used when creating all tablespaces for a database DB2 Storage Model Summary
    • A database is a collection of objects, including tables, indexes, views, containers, large objects, and triggers.
    • These objects are stored in a table space, which consists of a table space container
    • Tablespaces can be managed by the operating system or managed by DB2
    • Table Space container can select underlying storage-file system, bare device, or operating system directory
    • The tablespace consists of a number of extended databases (extent), and the extent is composed of extentsize (which can be defined by itself), which is the smallest unit of storage.
    • The type of table space to use, the size of the extents, the size of the data page, and the type of container should be determined primarily by performance and maintenance factors.
 what DB2 the CREATE database mydb databases
    • DB2 creates a number of files, including log files, configuration information, history files, and three default tablespace. These table spaces are:
    1. Syscatspace: This is where the DB2 system catalog is saved, and the system catalog tracks all the metadata associated with the DB2 object, which is commonly referred to as the data dictionary.
    2. TEMPSPACE1:DB2 is used to place temporary work areas for grouping, sorting, connecting, and reorganizing intermediate results.
    3. Userspace1: Where all user objects (tables, indexes) are stored by default.
    logical Structure of the database:
 the storage model for the DB2 database is:   The data in the database is actually stored in a table space, and table space is used to indicate the physical location of the data, even if it manages to map the logical database design to a database object in the operating system physical storage.  the storage structure in DB2 is a data page, extending data blocks, containers, such as table space

DB2 Database Disk storage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.