Informix Train Document detailed explanation

Source: Internet
Author: User
Tags define definition informix log reserved

I. Disk data organization structure

The top-level of the Informix-online disk data organization structure is the logical conceptual database space Dbspace, each database space has one or several physical unit data storage block chunk composition, the mirrored data storage block mirror guarantees that when the root data storage block fails, Online can continue to work. Each data storage block has several pages of data page composition, in order to improve the input and output efficiency, several consecutive data pages are composed of data continuous page extent. The user's database databases and table tables are stored in the default or specified database space, and the logical concept of the data table space Tblspace has one or more extent of the data row, which is stored in the page of data pages.

For better support of multimedia applications, multimedia data can be stored in binary large Object data page blobpage, several binary large object data pages in this binary large object space blobspace. Online uses logical log logicallog, physical log physicallog to manage database log operations.

1. Data storage block Chunk

Informix-online data is stored in a physically contiguous block of data storage chunk, and the data storage block is the largest physical unit of the online data store. Data storage blocks can be constructed in two ways, one of which is directly constructed on the physical disk of the system, and the other is constructed on the operating system files or volumes.

In the first case, only this (block) disk is defined on the operating system without formatting the (block) disk, so all data operations on it have online to complete, the operating system does not have any management, and the data space is contiguous on the physical disk, The storage space of this kind of data is called the primitive space rawspace.

In the second case, the operating system not only defines the data storage space (file), but also manages the data storage space (file), memory buffering, input and output of the data file operation. The establishment of data space is restricted by operating system and is discontinuous in physical storage. We call this data storage space as cookedspace space.

Compare the storage space between the two types of data, original space on disk continuous, no operating system cache and constraints, the non-original space on the disk is discontinuous, there are operating system cache and operating system input/output constraints, so in practical applications, the use of original space efficiency is higher than the original space, Since the original space is related to the system device, and the inconsistency of the definition of the device between different operating systems is defined, it is simpler to define the non primitive space than to define the original space. We refer the disk of the original space to the original device Rawdevice, while the operating system file of the non original space is called the operating system file Cookedfile.

In order to further improve the efficiency of database operation, we usually choose the character device as the storage of the actual raw equipment, so that when we input/output data, we can give full play to the system's DMA capabilities. When we use raw devices, we can build multiple data storage blocks on the same raw device. By defining the parameter offset and size of the data storage block in kilobytes, we can define multiple data storage blocks on the same disk or disk block, parameter offset defines the starting position of the data storage block, and the parameter size defines the size of the data storage block. Users must ensure that they do not overwrite each other on physical disks when setting parameter offset and size.

Set up three data storage blocks CHUNK1, CHUNK2, and Chunk3 on the original device/dev/rdsk/c0t1d1s0, which are 50MB, 30MB, and 50MB, respectively, because the size unit of chunk is KB, so chunk1, The size of Chunk2 and Chunk3 is 50000, 30000 and 50000, respectively. Under normal circumstances, the first data storage Block CHUNK1 offset is 0, so that the second data storage block CHUNK2 offset should be the first data storage block CHUNK1 size, and the third data storage Block Chunk3 offset is the second data storage block CHUNK2 offset plus the second data storage block CHUNK2 size. To ensure that no overlap occurs at the adjacent boundaries of the two data storage blocks, the starting position of the last data storage block can be slightly shifted. When operating system files are used as data storage space, it is generally not necessary to establish multiple data storage blocks in a single file. A file to create more than one block of data, the operating system for the data in the file will be longer positioning time.

The concept of online is consistent, whether it's a raw device or a non original device. In practical applications, some data storage blocks can be used in raw devices and other parts of the original equipment, but the original device using online management of I/O mechanism, rather than the original device using operating system UNIX I/O mechanism.

2. Data pages page

Informix-online in the data storage block in the data page as the unit to organize the data, and the data page as the unit to input output data, its size and data in the shared memory data buffer consistent, so the online data page size can not be changed. A data page is the smallest physical unit in the online organization that holds data.

Depending on the operating system, the size of the online data page is different. For example, on the SCO, At&t, Unisys and HP operating system platforms, each data page size of 2KB, and on the IBM and Sequent and other operating systems platform, the size of each data page is 4KB. The buffer size of the data in shared memory is also different depending on the operating system, and the value is the same as the size of the data page.

3. Data continuous page Extent

To improve the efficiency of data manipulation, online consists of several consecutive pages of data on a physical disk extent. When a user creates a data table, the online to a continuous page of data in the data storage block allocated a contiguous space, when the user's data filled with this data continuous page, online will be a continuous page of data in the data storage block to request a contiguous space to store more user data. By default, the first continuous page of data is 8 data pages when initialized.

Data continuous pages can not cross the data storage block, when the online need to apply for more data pages to form a continuous page of data, if the online can not find the amount of data on the physical device on the continuous page, online will discard these not enough to form a continuous page of data pages, Online will go to the next data storage block to request a continuous page of data on the physical device. Therefore, in the actual system, the too small data storage block will not be conducive to data operation performance and data access efficiency.

4. Database Space Dbspace

In the Informix-online disk data organization, the database space Dbspace is located in a relatively upper level. Database space is the logical concept of database storage space, one or several database space composed of online data entities. On a physical disk, each database space always corresponds to one or several data storage blocks, and in these data storage blocks corresponding to the database space, there must be a data storage block that is the root data storage block, while the other is a secondary data storage block. From the functional point of view, the root data storage block, in addition to having a secondary data storage block, can store user data, and it also has the function of managing the database space; from the retention page of the data storage block, the root data storage block has 56 reserved pages, and then the data storage block has only 3 reserved pages. Of course, different versions of online may have different number of reserved pages in the primary and subsequent data storage blocks, but the root data storage block requires more reserved pages to hold the definition of this database space.

After online initialization, there is a database space called the root database space Rootdbs, which is the first database space of the online system. When the root database space is established, its root data storage block is established, and all database logs and all defined information must be stored in the data storage block, which is more than the reserved pages of all other root data storage blocks. Because of the need for database log definitions, the definition of root data storage blocks for the root database space is particularly important, and the root data storage blocks on how to properly define the root database space are described in detail later.

In order to improve the efficiency of database system operation, the concept of temporary database space is introduced in the new dynamic server OnLineDynamicServer7.1 of Informix. In a system without temporary database space, the temporary data will be established in the default root database space, because the temporary data operation needs to be increased and deleted frequently, it will cause a lot of fragmentation in the data storage block of the root database space, which will result in the reduction of database operation efficiency; In addition, Those temporary data are also backed up together, which increases the amount of data backups and reduces the efficiency of data backups. Once the temporary database space is introduced, the intermediate results of the user's temporary data or data operations will be stored in the staging database space, and the temporary database space will no longer be backed up when the data is backed up.

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.