Skip to main content

Database Free Space Information

Database Free Space Information

Managing the free space (empty blocks) in a database is an important aspect of database maintenance. To see free space information, you can display the Free space view of the Management Portal or use the ^%FREECNT utility. Remember that the size and free space attributes of a database in normal operation change continuously, and that numbers reported by the Portal or the utility at a given point in time are approximations only.

If you determine that a database has more free space than is necessary, you may compact and truncate the database as described in Database Details Page.

Display Free Space Information Using the Management Portal

To display free space information, which shows information about the amount of free space on each local database, navigate to the Databases page (System Operation > Databases) and click the Free space view radio button. The following table describes the information displayed:

Local Databases Free space Information
Column Heading Definition
Name The database name; click this name to display more details. See Database Details Page.
Directory The system directory in which the primary volume of the database resides.
Max Size The maximum allocated size to which the database can grow, in gigabytes. The default is unlimited when you create a database.
Size The current allocated size of the database, in megabytes.
Note:

This field measures the logical size of the database. As a result, the size reported here may be lower than the physical size of the database, in particular for the IRISTEMP database.

Expansion Size Size (in MB) by which to expand the database. The default and recommended setting is zero (0) when you create a database, which indicates the use of system defaults (12% of the current size or 10 MB, whichever is larger). Under this setting, the expansion size will not be greater than 1GB.
Available The amount of free space (in MB) available in the database.
% Free The percentage of free space available in the database.
Disk Free Space The amount of space free on the volume.
Status The status of the directory, which indicates if the database is mounted and with what permissions.

For information about performing free space management operations from the Management Portal, see Database Details Page.

Display Free Space Information Using ^%FREECNT

InterSystems IRIS also provides the ^%FREECNT utility, which you run by entering do ^%FREECNT in the Terminal, to display the free space available in a database.

When using ^%FREECNT in the %SYS namespace, you can choose to display the free space of all databases by entering an asterisk (*) at the prompt, or enter one database directory name. For example:

%SYS>do ^%FREECNT
 
Database directory to show free space for (*=All)? *
 
Databases Selected
------------------
c:\MyIris\mgr\
c:\MyIris\mgr\irisaudit\
c:\MyIris\mgr\irislib\
c:\MyIris\mgr\irislocaldata\
c:\MyIris\mgr\iristemp\
c:\MyIris\mgr\user\
Device:
Right margin: 80 =>
 
 
                            Database Free Space
                              Feb 15 2012  7:25 PM
Database                           Max Size  Size    Available %Free   Disk Free
c:\MyIris\mgr\                    Unlimited 191MB   19MB      9.94    60.79GB
c:\MyIris\mgr\irisaudit\          Unlimited 1MB     0.43MB    43      60.79GB
c:\MyIris\mgr\irislib\            Unlimited 319MB   27MB      8.46    60.79GB
c:\MyIris\mgr\irislocaldata\      Unlimited 1MB     0.55MB    55      60.79GB
c:\MyIris\mgr\iristemp\           Unlimited 4MB     1.5MB     37.5    60.79GB
c:\MyIris\mgr\user\               Unlimited 1MB     0.43MB    43      60.79GB

In a namespace other than %SYS, the utility shows the free space of the databases in that namespace. For example:

USER>Do ^%FREECNT
 
 
Databases Selected
------------------
c:\MyIris\mgr\user\
Device:
Right margin: 80 =>
 
 
                            Database Free Space
                              Feb 15 2012  7:28 PM
Database                           Max Size  Size    Available %Free   Disk Free
c:\MyIris\mgr\user\                 Unlimited 1MB     0.52MB    52      42.72GB

Note:

A <- flag (in the %Free column) indicates that the percentage of free space in the specified database has dropped below 5%. Ensure that there is enough space on the file system to handle database expansion.

The ^DATABASE utility is another way to display free space information, as well as perform other database tasks. For example, you can compact globals in a database, or you can recreate a database, which lets you clear the data in an existing database without changing the database’s name or size. See ^DATABASE for information about the utility.

Note:

The data structures used by InterSystems IRIS are self-balancing and suffer no performance degradation over time. It is never necessary to take a database down to rebuild it nor to compress data or indexes to regain performance.

FeedbackOpens in a new tab