Postgres System information functions and examples
Here are collected some of the system functions and tricks how to get data from the Postgres database
How to get creation clause of the view
Sometimes you have an database view and you start to wonder what kind of sql clause there is. Following command will show you definition of particular view.
|
|
How do I see the status of database index in postgres
Notice! Following query requires the PG_stat extension.
|
|
Column | Description |
---|---|
schemaname | The name of the schema that contains the table. |
tablename | The name of the table. |
indexname | The name of the index. |
idx_scan | The number of index scans. |
idx_tup_read | The number of tuples read from the index. |
idx_tup_fetch | The number of tuples fetched from the table using the index. |