|Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)
Part Number A86720-01
Defining and Working with Analytic Workspaces, 8 of 12
This guide presents some very basic and simple information about ways in which you can minimize analytic workspace growth.
You can minimize analytic workspace growth through the judicious use of NA stored pages and by frequently updating the analytic workspace when you are attached exclusively. You can completely reorganize the analytic workspace by exporting and importing all of the analytic workspace files.
An NA page is an analytic workspace page that contains only NA values for a variable. Depending on the status of the variable at the time the NA values are assigned, NA pages are either unstored or stored:
NA stored pages are created only if all of the following conditions are true:
You can use the OBJ function with the NAPAGES keyword to retrieve the number of NA pages (either stored and unstored) in an analytic workspace.
You can also run DBREPORT to retrieve information about the number of NA pages (both stored and unstored) in an analytic workspace.
For more information on the OBJ function and the DBREPORT program, see the topic for the function or the program in the OLAP DML Reference.
You can use the NAPAGEFREE command to release any NA stored pages that have been created for a variable. Once these pages are released, they can be used to store new data. NAPAGEFREE loops through all allocated pages for the variable and converts any NA stored pages into NA unstored pages. When it is finished, it reports the number of pages that have been freed.
For more information on the NAPAGEFREE command, see the topic for the function in the OLAP DML Reference.
The following example uses OBJ(DISKSIZE) to query the variable SALES before and after NAPAGEFREE is issued to show its reduction by the number of pages that are freed by NAPAGEFREE (three in this example).
The first OBJ function shows that 35 pages are being used to store the SALES variable.
Now the NAPAGEFREE command frees three pages that contained only NA values.
When the OBJ function is reissued, it shows that only 33 pages are now being used to store the SALES variable.
When many users are attached to an analytic workspace, unused pages are not actually released when the analytic workspace is updated. Instead, an erase list is created. The erase list identifies the pages that it can release later when only one user is attached to the analytic workspace.
When you update an analytic workspace and no other users are attached to the analytic workspace, the erase list is flushed and all unused pages are released. This creates more space in the analytic workspace files for new data. Consequently, to minimize analytic workspace growth, you want to update the analytic workspace frequently when you have exclusive use it.
You can reorganize your analytic workspace files by exporting all of the objects in your analytic workspace and then importing them into a new analytic workspace. This procedure removes extra space. The new files may be substantially smaller.
To reorganize your analytic workspace by exporting and importing OLAP DML objects, follow the procedure outlined below.
For more information on importing and exporting analytic workspace files, see the topics for the EXPORT and IMPORT commands in the OLAP DML Reference.
If you use CHGDFN SEGWIDTH to specify the segment size of any variable, you should be aware that this information cannot be exported and imported. If you export any variable, when that variable is imported, it will use the default segment size.