Talking about the database can not say that the database storage, said that storage can not help but say that the database management of space. Here we mainly talk about the problem of the management of the space of IDs.
In physical terms, the main page,chunk of IDs management is the extent,tablespace,dbsapce of logic. The continuous page is composed of extent, multiple extent composed of tablespace,dbspace for logical management chunk, and each tablespace is based on DBSAPCE.
Chunk: A unit of physical disk space that is not promised to exceed 2G prior to version 9.4. A chunk consists of three parts of Path,offset,size. So these three parameters are essential when we use the onspaces command to add Chunk. Theoretically there are up to 2048 blocks of storage on a database server, but it is actually determined by the number of files that can be opened by a process defined by the Unix kernel. If you are using Cookedfile to store, then offset can be set to 0, if you use Rawdevice to store, that offset cannot be 0, at least the first chunk offset cannot be 0.
Page: is one of the most basic I/O units. The size of a page is determined by the OS, 2K, and 4 K. Let's take a 2K to illustrate. A page has 2048 bit, the header is made up of 24bit, with a 4bit timestamp at the end of the page, which means that there are only 2020 bits left in each page, and a slot table on each page, a slot table 4bit, a record corresponding to a slot table, This allows you to set the number of records stored on each page. The purpose of saying this is to show that when we build the table, we should try not to build too much of the table, and some of the table records will be larger than one page, so that the efficiency of reading is not too high. There is also a fillfactor parameter determines the size of the data page, if the value set is not too reasonable, often on the current node split, that the table's reading efficiency is certainly influential.
Extent: is a set of contiguous page sets on disk. The page in each extent is contiguous, and the size of the default extent in the table determines the degree of concentration of the data stored in the table 16k,extent&. If the data stored over and scattered in the disk I/O time will certainly be longer, in general, the size of each table extent recommended not more than 50, if too large, you need to make reasonable adjustments. In addition, we must mention that with the increase in the number of extent, each time the size of the space is not the same, in every 16 times, doubled. For example, the first extent is 16K, the 17th extent is 32K, and the 33rd is 64K, which doubles the growth.
Tablespace: is a logical collection of extent. Each extent is not necessarily continuous in physics.
Dbspace: is a set of logical sets of chunk. In general, the bare equipment of the chunk placed in a dbspace, or a group of ripe files in a group of chunk, and some of the raw equipment and cooked files in a group of dbspace, but do not recommend this. In fact, there are three categories in Dbsapce, one is the general storage of data Dbsapce, the other is tempdbspace, there is a blobspace. I will not say the first one. Let's say Blobsapce first.
Blobspace:blobspace is the chunk of a group of logical organizations, but is used to store data of byte and text types. The blobspace cannot hold rows or indexes, only the pages where the blob is stored, and the System Information page that stores the BLOB. Because the size of the Blob page in Blobspace is specified at creation time, all blob page sizes in all blobspace are the same. The write to BLOB is not buffered in the buffer pool, so the value of the BLOB does not write the logical log file. When you modify the value of a blob, you should have enough space on the disk to place the Blob's initial value and the modified value.
Tempdbspace: is a group of temporary dbspace. He is specified in the Dbspacetemp parameter. You need to add the-t parameter when Onspaces is created. The operation of the tempsaces is not to write the logical log. When you create a temporary table and do Groupby,orderby, you use a JOIN statement and you create the index with temporary space. In general, all tempspace sizes are 10% of the normal business data. If it's too small, a big operation will go wrong.
Select*fromtab_ainsertintotemptab_b is not written to Tempdbspace. Select*fromtab_ainsertintotemptab_bwithnolog only wrote to Tempdbspace.