What are pagesets and pages in DB2 a quick information you need as a developer.
There are two types of pagesets in DB2
- Data pageset- which contains the VSAM linear datasets for a tablespace.
- Index pagesets- which contain the datasets for indexspaces.
There are three types of pages in a pageset:
- header pages,
- data pages,
- space map pages.
If the tablespace is compressed, there are dictionary pages.
Zero page condition in DB2:
A zero page is a page with all zeros, normally found at the end of the pageset or at the end of a segment. Zero pages can also exist after the last dictionary page. There are several actions that can cause a zero page condition.
Any tablespace can have zero pages at the end, between the last data page and the next track/cylinder limit. A segmented tablespace could have a zero page in the last pages of the last segment. A compressed segmented tablespace could have zero pages between the last dictionary page and the first data page.
Once a page has been formatted, it will remain formatted and can become empty due to row deletion, but it will never become a zero page. However, canceling a job can produce zero pages under certain conditions.This can occur if several applications are in contention for the same page, possibly trying to insert in clustering-key order.
If page-level locking is used and the applications are in contention for the same page, the inserts will not wait on locks. Instead, they will spread the rows onto multiple pages.
If one of the applications cancels after locking a page but before formatting it, and another application has already formatted the following page, a zero page can be left by the canceled application.
- DB2 UDF sample function read now with awesome interview question
- Real reason why Left outer JOIN only you need to use in DB2 SQL
- 3 top rules to write alias instead of Table column name in SQL query
- 4 top DB2 host variable points you need to know before write program