Contents
What is regular table space in Db2?
For a database that was created in Db2 Version 10.1 or later, the default time to read one page into memory for 4 KB PAGESIZE table space is 0.04 milliseconds.
What can be the size of a page in Db2?
Pages can be four sizes: 4, 8, 16, and 32 KB. Table data pages do not contain the data for columns that are defined with LONG VARCHAR, LONG VARGRAPHIC, BLOB, CLOB, DCLOB, or XML data types. An exception is if the LOB or XML document is inlined by using INLINE LENGTH option of the column.
How do you create a table space in Db2?
Procedure
- To create an automatic storage table space using the command line, enter either of the following statements: CREATE TABLESPACE name or CREATE TABLESPACE name MANAGED BY AUTOMATIC STORAGE.
- To create an SMS table space using the command line, enter:
- To create a DMS table space using the command line, enter:
What is page in Db2?
Pages are the unit of management within a buffer pool. The unit of I/O is one or more pages chained together. Db2 makes a getpage request operation whenever there is a need to access data in a page, either in an index or a table, such as when executing an SQL statement.
How does Bufferpool work in DB2?
A buffer pool provides working memory and cache for database pages. Buffer pools improve database system performance by allowing data to be accessed from memory instead of from disk. Because most page data manipulation takes place in buffer pools, configuring buffer pools is the single most important tuning area.
How is data stored in DB2?
In DB2, data is stored in a structure called a Page, it is the equivalent of an Oracle Block. The basic page structure in DB2 is that there is a fixed length page header, a variable length page trailer, and the space in between is used for data or free space.
How to choose the best DB2 table space?
The Db2 optimizer will usually choose the table space that both has a page size that is large enough to hold at least one row on a single page, and also the one that has a buffer pool that will fit the most rows for the interim result set.
How big is a temporary table space in a database?
Generally a database should have a temporary table space for each page size in use in a database, and should always have a system temporary table space with a 32 K page size.
Why do I need temporary space in DB2?
Db2 needs some temporary space on disk to perform some actions. Commonly we think of these actions as primarily sort and join operations. These are operations where Db2 will first use the SORTHEAP memory area, but some data sets are just too big to fit in these locations.
Is it good to create the index table in DB2?
From what I have read (check out Understanding DB2: Learning Visually with Examples), IBM recommends that you place data, indexes, and long data (meaning LOB type data as well as deprecated types like LONG VARCHAR) into their own tablespaces. Main reason is for maintenance and support.