Different Disk Space Views Return Different Results - Teradata VantageCloud Lake

Lake - Database Reference

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ohi1683672393549.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
ohi1683672393549

Because the DBC.AllSpaceV, DBC.DiskSpaceV, and DBC.TableSizeV system views report different information, using superficially identical requests to return information using those views often returns conflicting results. For example, while DBC.AllSpaceV and DBC.DiskSpaceV include information about spool space in their reports, DBC.TableSizeV does not.

Similarly, selecting SUM(CurrentPerm) from each of these views returns different results. For example, requesting SUM(CurrentPerm) from DBC.AllSpaceV returns a sum of All “tables,” representing the database or user total plus the sum of each table in the database or user. Submitting the same request using DBC.TableSizeV returns sums for all tables except for All, and submitting the query using DBC.DiskSpaceV returns sums only for All.

The following requests show the different results the same request returns for the same information, but using different system views to access the data.
  • DBC.AllSpaceV
         SELECT MAX(CurrentPerm), SUM(CurrentPerm)
         FROM DBC.AllSpaceV
         WHERE DatabaseName = user;
         Maximum(CurrentPerm)      Sum(CurrentPerm)
         --------------------      ----------------
                      112,640             1,308,672

    The reported values represent the disk space for all of the tables contained by user plus the disk space for the All table.

  • DBC.DiskSpaceV
         SELECT MAX(CurrentPerm), SUM(CurrentPerm)
         FROM DBC.DiskSpaceV
         WHERE DatabaseName = user;
         Maximum(CurrentPerm)      Sum(CurrentPerm)
         --------------------      ----------------
                      112,640               654,336

    The reported values represent the disk space for the All table.

  • DBC.TableSizeV
         SELECT MAX(CurrentPerm), SUM(CurrentPerm)
         FROM DBC.TableSizeV
         WHERE DatabaseName = user;
         Maximum(CurrentPerm)      Sum(CurrentPerm)
         --------------------      ----------------
                       71,680               654,336

    The reported values represent the disk space for all of the tables contained by user, but do not include the All table.

Use the following table to determine which system views are appropriate for requesting disk space information for different database objects.

Level at Which to Report Disk Space Information View
table DBC.TableSizeV
database, user, or profile DBC.DiskSpaceV
database or user with global space accounting DBC.GlobalDBSpaceV
tables plus database, user, or profile DBC.AllSpaceV