Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
AND
ANDFrom where does the query gets its information?
AND
AND

There are 961 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
121Exclude constraint to prevent overlapping time periodsFind exclude constraints on base tables with multiple date/timestamp columns that prevent overlapping time periods.GeneralINFORMATION_SCHEMA+system catalog base tables2023-11-07 00:44MIT License
122Explicit lockingPostgreSQL uses Multi-version Concurrency Control (MVCC) and thus, sometimes, one has to explicitly lock certain rows or entire table. One has to use LOCK TABLE or SELECT … FOR UPDATE statements for that.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-11 15:02MIT License
123Extension routinesFind all routines that belong to an extension.Generalsystem catalog base tables only2020-11-06 14:51MIT License
124Extension routines in the schema "public"Find extensions that routines are in the schema public.Generalsystem catalog base tables only2024-01-04 11:56MIT License
125Extensions that are available but are not installedTry to use as much the possibilities of the DBMS as possible. On the other hand, do not install extensions that are not needed in order not to overcomplicate the database.Generalsystem catalog base tables only2020-11-06 14:51MIT License
126Find all non-foreign key columns of base tablesFind all non-foreign key columns of base tables. Make sure that no foreign key constraint is missing.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-21 02:59MIT License
127Find all publicationsFind publications of tables that have been created in order to enable logical replication.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-18 15:09MIT License
128Foreign key columns that do not have an integer or varchar typeFind foreign key columns that do not have smallint, integer, bigint, or varchar(n) type. These are the most commonly used types in case of key/foreign key columns. Although the use of other types would be perfectly legal as well, make sure that you have selected the best possible data type for each and every column.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-16 10:14MIT License
129Foreign keys with ON DELETE CASCADEFind referential constraints (foreign key constraints) that employ ON DELETE CASCADE compensatory action. ON DELETE CASCADE should only be used if it has been created based on a generalization or a composition in the conceptual data model or if the foreign key connects a table that corresponds to the main entity type with a table that corresponds to a non-main entity type.Generalsystem catalog base tables only2020-11-16 10:15MIT License
130Foreign keys with ON UPDATE CASCADEReferential constraints (foreign key constraints) that employ ON UPDATE CASCADE compensatory action. ON UPDATE CASCADE should only be used if the referenced key is a natural key (its values can be changed).Generalsystem catalog base tables only2020-11-15 15:39MIT License
131Generated stored base table columnsFind generated stored columns in PostgreSQL base tables. The support of generated columns was added to PostgreSQL 12. These could be used to improve the performance of queries.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
132Granted rolesFind membership relations between roles.Generalsystem catalog base tables only2024-01-07 13:30MIT License
133GranteesDatabase must be used by users who have minimal set of privileges for performing tasks. The query helps to find out as to whether some user/role other than PUBLIC and a superuser have rights to use tables and routines of the database.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
134Index FILLFACTOR has been changedFind all indexes where FILLFACTOR is not the default. The default is different in case of different index types is different. In case of B-tree indexes the default is 90.Generalsystem catalog base tables only2022-11-02 10:58MIT License
135Installed extensionsTry to use as much the possibilities of the DBMS as possible. On the other hand, do not install extensions that are not needed in order not to overcomplicate the database.Generalsystem catalog base tables only2020-11-06 14:51MIT License
136Mandatory non-primary key columnsFind mandatory non-primary key columns, i.e., the columns that have NOT NULL constraint.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-05 19:35MIT License
137Minimum tuple length required before trying to move long column values into TOAST tables has been changedFind base tables in case of which toast_tuple_target storage parameter value is not the default value (2040). "Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. " Make sure that the parameter has an optimal value.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
138More than one index on a columnFind base table columns that belong to more than one index (including automatically created indexes that support constraints).Generalsystem catalog base tables only2021-11-10 14:44MIT License
139Multiple inheritanceFind instances of multiple inheriance of base tables. Make sure that multiple inheritance is indeed needed.Generalsystem catalog base tables only2020-11-15 12:20MIT License
140Name and description maximum lengthFind tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different.GeneralINFORMATION_SCHEMA+system catalog base tables2021-02-24 20:36MIT License