DB2 UDB V8.1 Management Learning Notes (i) _DB2

Source: Internet
Author: User
Tags db2
The DB2 tutorial you are looking at is: DB2 UDB V8.1 Management Learning Notes (i). DB2 Basic Concepts
A few concepts from top to bottom in DB2:
Instance (Instance),
Database,
Table Space (tablespace),
Container (Container)
In one operating system, DB2 Data Services can run multiple instances at the same time (as opposed to Oracle having only one instance in a system).
Database definition in an instance, an instance can contain multiple databases. The different databases in the same instance are completely independent and have their own independent system catalog tables.
There are 2 ways to manage a table space:
DMS (Database management space) way
SMS (System manegement Space) method
DMS and SMS are specified when the table space is established and cannot be converted after being built. For DMS, a table space corresponds to one or more containers (Container), which specify where the data is physically stored. For SMS methods, only one directory can be specified and cannot be incremented.
Table spaces have the following types:
System catalog Table space (Syscatspace)
System Temp Table space (systempspace)
User table space (userspace)
User Temp table space (usertempspace)
There must be two basic table spaces in a database, the system catalog table space and the system temporary table space respectively. Any object created in the database is reflected in the way that records are added to the System catalog table space, and for temporary tablespaces, the disk size is dynamically scaled according to usage, which allocates disk space only when it is needed and recycles after use. In addition, if you need to create a table, you need to create a user tablespace, and if you need to use a temporary table, you need to create a user temporary table space.
The container is divided into three types:
Files file
Devices Equipment
Directory directories
Documents and devices for use in the form of DMS;
Table space for SMS, which does not require manual management of data storage files, DB2 can automatically add storage files to the directory as long as disk space permits.
Essentially, the table space is the logical location definition of the data store, and the container is the physical location definition of the data store.
The performance of the database
The main factors that affect the performance of a database are the following:
Disks (disk)
Memory (Memory)
Processor (CPU)
Network (Network)
One of the most significant disk, 90% performance bottlenecks may be from the disk IO competition;
Next is the memory, on the one hand refers to the total amount of physical memory to meet the demand, on the other hand refers to the memory related configuration parameters should be properly configured;
Of course, the performance of the processor is also very important, the multi-channel CPU on which depends on the computational capabilities of the complex SQL query to play a significant effect;
Network is not a major factor, is an objective environmental factors, refers to the slow speed of the data will affect the transmission. Here are some ways to improve database performance:
For servers running the database service, you can configure as many physical disks as possible, and each block will not have to be too large, which can effectively share the disk IO competition between the data store and the read operation process. That is, the use of multiple small-capacity disk in performance is better than only a large volume of disk.
If conditions permit, try to make the data storage service and the operating system run separately on physically separate disks.
A tablespace that is managed using DMS (Database Management space).
Create multiple table spaces on physically different disks. Data and indexes can then be stored separately in different tablespaces, which can significantly improve performance. You can also split a large, frequently used table vertically into smaller tables, stored in different table spaces, and then federated with a single view.
DB2 server can manage raw devices, that is, in addition to the system and the DB2 service running disk, for the DB2 data storage separate preparation disk, can be more than one block, partition does not need to format, after the creation of bare devices directly to the DB2 for management, for storing data.
The system's temporary tablespace has a great impact on the performance of the database, and when the managed physical memory does not meet the needs of the database operation, DB2 writes the temporary data to disk, then uses the system temporary table space, and this happens frequently.
Try to place the data where the disk is near the most internal track, because the disk is accessed faster.
Key performance-related parameters
The DB2 parameter configuration is divided into two levels, one at the instance level and the other at the database level. Parameters that have a greater impact on data service can be configured primarily at the database level. Here are three of the more important memory configuration parameters:
Bufferpagelocklistsortheap
Bufferpage: Shared by all objects in the same database.
Sortheap: The memory swap area used for sorting, unshared, should not be set too large, otherwise, it can easily cause memory exhaustion, because each transaction will request separate memory for sorting.

This news total 2 pages, current in 1th page 1 2


<

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.