How to find number of tables in a database and size of database Pervasive

764 views Asked by At

I am using Pervasive Control Center v11. How do I find the size of an entire database and the number of tables?

The following results in error:'error in expression'

SELECT pg_size_pretty( pg_database_size('RECORDS'))
1

There are 1 answers

0
mirtheil On

As far as I know, there's no way to get the size of the database for a Pervasive PSQL database through a SQL Statement. You can look at the actual files on disk to see the size. You can get a count of the tables by executing the following statement:

select count(*) from x$file

This count will include the system tables (X$XXXX).

The pg_ functions aren't Pervasive PSQL functions but are PostgreSQL functions and won't work with a Pervasive / Actian database.