Amazon Aurora DSQL is provided as a Preview service.
To learn more, see Betas and Previews
System tables and commands in Aurora DSQL
See the following sections to learn about the supported system tables and catalogs in Aurora DSQL.
System tables
Aurora DSQL is compatible with PostgreSQL, so many system catalog
tables
Important PostgreSQL catalog tables and views
The following table describes the most common tables and views you might use in Aurora DSQL.
Name | Description |
---|---|
|
Information on all schemas |
|
Information on the all tables |
|
Information on all attributes |
|
Information on (pre-)defined views |
|
Describes all tables, column, indices, and similar objects |
|
A view on the planner statistics |
|
Information on users |
|
Information on users and groups |
|
Lists all indexes |
|
Lists constraints on tables |
Supported and unsupported catalog tables
The following table indicates which tables are supported and unsupported in Aurora DSQL.
Name | Applicable to Aurora DSQL |
---|---|
|
No |
|
Yes |
|
No |
|
No |
|
Yes |
|
Yes |
|
No (use |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
No |
|
No |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
Yes |
|
Yes |
|
No |
|
No |
|
No |
|
Yes |
|
Yes |
|
No |
|
Yes |
|
No |
|
Yes |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
Yes |
|
Yes |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
No |
Supported and unsupported system views
The following table indicates which views are supported and unsupported in Aurora DSQL.
Name | Applicable to Aurora DSQL |
---|---|
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
No |
|
No |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
Yes |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
|
No |
The sys.jobs and sys.iam_pg_role_mappings views
Aurora DSQL supports the following system views:
sys.jobs
-
sys.jobs
provides status information about asynchronous jobs. For example, after you create an asynchronous index, Aurora DSQL returns ajob_uuid
. You can use thisjob_uuid
withsys.jobs
to look up the status of the job.select * from sys.jobs where job_id = 'example_job_uuid'; job_id | status | details ------------------+------------+--------- example_job_uuid | processing | (1 row)
sys.iam_pg_role_mappings
-
The view
sys.iam_pg_role_mappings
provides information about the permissions granted to IAM users. For example, suppose thatDQSLDBConnect
is an IAM role to give access of Aurora DSQL to non-admins. A user namedtestuser
is granted theDQSLDBConnect
role and corresponding permissions. You can query thesys.iam_pg_role_mappings
view to see which users are granted which permissions.select * from sys.iam_pg_role_mappings;
The pg_class table
The pg_class
table stores metadata about database objects. To get the
approximate count of how many rows are in a table, run the following command.
select reltuples from pg_class where relname = '
table_name
'; reltuples -------------- 9.993836e+08
If get the size of a table in bytes, run the following command. Note that 32768 is an internal parameter that you must include in the query.
select pg_size_pretty(relpages * 32768::bigint) as relbytes from pg_class where relname = '
<example_table_name>
';
The ANALYZE command
ANALYZE
collects statistics about the contents of tables in the database,
and stores the results in the pg_stats
system view. Subsequently, the query
planner uses these statistics to help determine the most efficient execution plans for
queries. In Aurora DSQL, you can't run the ANALYZE
command within an explicit
transaction. ANALYZE
isn't subject to the database transaction timeout
limit.