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...
101Constraints that are redefined in a subtable.Find primary key, unique, foreign key, and exclude constraints that have been defined in a supertable (parent table) and have been redefined in its subtable.Generalsystem catalog base tables only2020-12-02 17:28MIT License
102Constraint-supporting UNIQUE indexes with the same leading columnFind indexes that support a uniqueness constraint and have the same leading column.Generalsystem catalog base tables only2023-11-26 16:01MIT License
103Coverage by derived tablesFind for each base table the list of derived tables (both views and materialized views) that refer to the base table. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from the subquery of at least one derived table.GeneralINFORMATION_SCHEMA+system catalog base tables2023-11-11 09:31MIT License
104Coverage by routines that have the SQL-standard bodyFind for each base table the list of routines (functions and procedures) that refer to the base table. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from at least one routine.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-05 17:00MIT License
105Data type usage in the base table columnsGet overview of used data types in the columns of base tables. If the selection is very small then this is a warning sign that perhaps unsuitable types have been used.GeneralINFORMATION_SCHEMA only2023-12-22 12:39MIT License
106Deferrable constraintsFind all deferrable constraints.Generalsystem catalog base tables only2021-10-08 11:25MIT License
107Derived tables that have a column with the xid typeFind the derived tables (views and materialized views) that have a column with the xid type, i.e., these use the data from the hidden xmin column of a base table. If one uses optimistic approach for dealing with the concurrent data modifications, then xmin values should be presented by views and used in routines that modify or delete rows.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
108Derived tables that present data in json or xml formatFind views and materialized views that present data in json or xml format. Instead of recording data in this format in base tables one could generate the data value on the fly based on data that has been recorded in base tables.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
109Derived tables with multiple DISTINCT'sFind derived tables (views and materialized views) that contain more than one DISTINCT invocation. Make sure that the query is correctly written, including that it does not have unwanted formation of a Cartesian product.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-10 13:25MIT License
110Derived tables with rankingFind views and materialized views that use rank and dense_rank window functions.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
111Derived tables with sortingFind derived tables where the rows are ordered, i.e., there is ORDER BY clause at the end of the view. Different users may want to see the rows in different order. Thus, the DBMS may have to do extra and unnecessary work by firstly sorting based on one set of rows and after that based on other set of rows. Use sorting if you know that all the users want the rows in the same order and cannot/will not change the order in the application.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-22 21:34MIT License
112Derived tables with string_aggFind views and materialized views that use string_agg aggregate function.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
113Different non-surrogate key default valuesFind the different default values that implement something other than a surrogate key.GeneralINFORMATION_SCHEMA only2021-03-04 10:31MIT License
114Different search paths of SECURITY DEFINER functionsFind the different search paths used in case of SECURITY DEFINER functions and the number of their occurrences. Make sure that these have been specified correctly and consistently and that they do not refer to any non-existent schemas.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-16 10:59MIT License
115Different tasks of rulesFind different tasks that are solved by using rules, i.e., different rules on the same table or different tables that do the same thing are considered to solve one task.Generalsystem catalog base tables only2024-01-14 16:10MIT License
116Different tasks of triggersFind different tasks that are solved by using triggers, i.e., different triggers on the same table or different tables that do the same thing are considered to solve one task.GeneralINFORMATION_SCHEMA+system catalog base tables2024-01-04 00:53MIT License
117Domain candidatesFind column descriptions that are candidates for describing a domain.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
118Domain usage in base tablesFind for each domain the number of usages in base tables. The less you have managed to reuse domains in case of different columns, the more you have wasted your time by creating the domains.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
119Do not always depend on one's parentFind where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table.Generalsystem catalog base tables only2021-03-12 15:36MIT License
120Do not always depend on one's parent (INFORMATION_SCHEMA)Find where a hierarchical structure is implemented in a base table by having a foreign key that refers to a candidate key of the same table. This design is called adjacency list.GeneralINFORMATION_SCHEMA only2021-03-07 10:57MIT License