Query goal: | Find unlogged tables. These may improve the performance of INSERT operations, but with the price of possibly loosing data - an unlogged table is automatically truncated after a crash or unclean shutdown. |
Query type: | General (Overview of some aspect of the database.) |
Query license: | MIT License |
Data source: | system catalog only |
SQL query: | Click on query to copy it
SELECT nspname AS schema_name, relname AS table_name FROM pg_namespace AS n INNER JOIN pg_authid AS a ON n.nspowner=a.oid INNER JOIN pg_class AS c ON n.oid=c.relnamespace WHERE (nspname='public' OR rolname<>'postgres') AND relkind='r' AND relpersistence='u' ORDER BY schema_name, table_name; |
Collection name | Collection description |
---|---|
Find problems by overview | Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not . |
Category name | Category description |
---|---|
Performance | Queries of this category provide information about indexes in a database. |
Reference |
---|
https://www.compose.com/articles/faster-performance-with-unlogged-tables-in-postgresql/ |
https://blog.nukomeet.com/faster-inserts-how-to-increase-postgresql-write-performance-24d76bd56f75 |