How to find table size in teradata

    how to find table size in teradata
    how to find the size of a volatile table in teradata
    check table size in teradata
    teradata determine table size
  • How to find table size in teradata
  • What is currentperm in teradata.

    How to calculate the tablesize , database size  and free space left in a database in teradata?

    DBC.TABLESIZE and DBC.DISKSPACE are the systems tables used to find the space occupied.

    Below Query gives the table size of each tables in the database and it will be useful to find the big tables in case of any space recovery.

    SELECT         DATABASENAME,

    TABLENAME,

    SUM(CURRENTPERM/(1024*1024*1024)) AS "TABLE SIZE"

    FROM

    DBC.TABLESIZE

    WHERE

    DATABASENAME = <'DATABASE_NAME'> AND TABLENAME = <'TABLE_NAME'>

    GROUP BY 1,2;

    Below query gives the total space and free space available in a database.

    SELECT

            DATABASENAME DATABASE_NAME,

            SUM(MAXPERM)/(1024*1024*1024) TOTAL_PERM_SPACE,

            SUM(CURRENTPERM)/(1024*1024*1024) CURRENT_PERM_SPACE,

            TOTAL_PERM_SPACE-CURRENT_PERM_SPACE as FREE_SPACE

     FROM

            DBC.DISKSPACE

    &n

      teradata query to find table size in mb
      teradata query to find table size