Filter Queries

Found 1056 queries.

  • All the queries about database objects contain a subcondition to exclude from the result information about the system catalog.
  • Although the statements use SQL constructs (common table expressions; NOT in subqueries) that could cause performance problems in case of large datasets, it shouldn't be a problem in case of the relatively small amount of data in the system catalog of a database.

#1041. The number of user-defined triggers

INFORMATION_SCHEMA+system catalog base tables

Triggers can be used to maintain data integrity in a database by causing rejection of data that does not conform to certain rules. Therefore, the number of triggers in a database gives some indications about the state of enforcing constraints at the database level. The query does not count internal triggers.

Sofware measure License: MIT (opens in new tab)

#1042. The number of user defined triggers by different characteristics

INFORMATION_SCHEMA only

Find the number of user defined triggers by action orientation (ROW, STATEMENT), action timing (BEFORE, AFTER, INSTEAD OF), and event type (INSERT, UPDATE, DELETE) and their combinations.

Sofware measure License: MIT (opens in new tab)

#1043. The number of user-defined triggers by schema, by type, and in total

INFORMATION_SCHEMA+system catalog base tables

Triggers can be used to maintain data integrity in a database by causing rejection of data that does not conform to certain rules. Therefore, the number of triggers in a database gives an indication about the state of enforcing constraints at the database level.

Sofware measure License: MIT (opens in new tab)

#1044. The proportion of mandatory and optional textual base table columns

INFORMATION_SCHEMA only

Find the number of textual base table columns, the number of optional textual base table columns (permit NULLs), and the number of mandatory textual base table columns (do not permit NULLs).

Sofware measure License: MIT (opens in new tab)

#1045. The proportion of using different integer types as types of base table columns

INFORMATION_SCHEMA only

Find the number of base table columns that use different integer types (SMALLINT, INTEGER, BIGINT) and their proportion from the overall set of columns that use an integer type.

Sofware measure License: MIT (opens in new tab)

#1046. The storage size of each index (the system catalog excluded)

system catalog base tables only

Get overview of disk usage.

Sofware measure License: MIT (opens in new tab)

#1047. The storage size of each schema data object (the system catalog excluded)

system catalog base tables only

Get overview of disk usage by different schema objects that contain user data.

Sofware measure License: MIT (opens in new tab)

#1048. The storage size of each table (including indexes) (the system catalog excluded)

system catalog base tables only

Get overview of disk usage.

Sofware measure License: MIT (opens in new tab)

#1049. The total number of physical lines of code in the bodies of user-defined SQL and PL/pgSQL functions/procedures

INFORMATION_SCHEMA+system catalog base tables

Find a numerical measure that describes the extent of the database public interface (virtual data layer) through which users access the database.

Sofware measure License: MIT (opens in new tab)

#1050. The total size of all indexes (system catalog excluded)

system catalog base tables only

Sofware measure License: MIT (opens in new tab)

#1051. The total size of all tables (system catalog excluded)

system catalog base tables only

Sofware measure License: MIT (opens in new tab)

#1052. The total storage size of all indexes (the system catalog excluded)

system catalog base tables only

Get overview of disk usage.

Sofware measure License: MIT (opens in new tab)

#1053. The total storage size of the database (the system catalog included)

system catalog base tables only

Get overview of disk usage.

Sofware measure License: MIT (opens in new tab)

#1054. The usage of double vs singular underscores or spaces in names as separator of name components

INFORMATION_SCHEMA+system catalog base tables

Improve the readability of names. Find the number of names (identifiers) of user-defined database objects that contain two or more consecutive underscores or spaces as the separator of name components vs. the number of names that contain a single underscore or space to separate name components. Try to be consistent in the usage of underscores.

Sofware measure License: MIT (opens in new tab)

#1055. The use of xmin hidden column in views and routines

INFORMATION_SCHEMA+system catalog base tables

Find the number of views and materialized views that have a column with the xid type and the number of routines that contain a UPDATE or a DELETE statement that search condition refers to the xmin column. If one uses optimistic approach for dealing with the concurrent modifications of data, then xmin values should be presented by views and used in routines that modify or delete rows.

Sofware measure License: MIT (opens in new tab)

#1056. Too generic names (columns) (aggregate view)(2)

INFORMATION_SCHEMA+system catalog base tables

This query calculates the total cardinality of semantically weak column identifiers across the entire schema, encompassing both base tables and views. It applies a uniform definition of "generic" (e.g., flagging identifiers like id, type, date) regardless of the underlying object type. By treating table and view columns equivalently, the query provides a holistic metric of naming ambiguity, quantifying the overall prevalence of non-descriptive attributes within the database's public interface.

Sofware measure License: MIT (opens in new tab)
# Name(activate to sort ascending) Goal(activate to sort ascending) Type(sorted ascending, activate to sort descending) Data source(activate to sort ascending) Last update(activate to sort ascending) License Actions
1041 The number of user-defined triggers Triggers can be used to maintain data integrity in a database by causing rejection of data that does not conform to certain rules. Therefore, the number of triggers in a database gives some indications about the state of enforcing constraints at the database level. The query does not count internal triggers. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
1042 The number of user defined triggers by different characteristics Find the number of user defined triggers by action orientation (ROW, STATEMENT), action timing (BEFORE, AFTER, INSTEAD OF), and event type (INSERT, UPDATE, DELETE) and their combinations. Sofware measure INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
1043 The number of user-defined triggers by schema, by type, and in total Triggers can be used to maintain data integrity in a database by causing rejection of data that does not conform to certain rules. Therefore, the number of triggers in a database gives an indication about the state of enforcing constraints at the database level. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
1044 The proportion of mandatory and optional textual base table columns Find the number of textual base table columns, the number of optional textual base table columns (permit NULLs), and the number of mandatory textual base table columns (do not permit NULLs). Sofware measure INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
1045 The proportion of using different integer types as types of base table columns Find the number of base table columns that use different integer types (SMALLINT, INTEGER, BIGINT) and their proportion from the overall set of columns that use an integer type. Sofware measure INFORMATION_SCHEMA only MIT (opens in new tab) View (opens in new tab)
1046 The storage size of each index (the system catalog excluded) Get overview of disk usage. Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1047 The storage size of each schema data object (the system catalog excluded) Get overview of disk usage by different schema objects that contain user data. Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1048 The storage size of each table (including indexes) (the system catalog excluded) Get overview of disk usage. Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1049 The total number of physical lines of code in the bodies of user-defined SQL and PL/pgSQL functions/procedures Find a numerical measure that describes the extent of the database public interface (virtual data layer) through which users access the database. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
1050 The total size of all indexes (system catalog excluded) Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1051 The total size of all tables (system catalog excluded) Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1052 The total storage size of all indexes (the system catalog excluded) Get overview of disk usage. Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1053 The total storage size of the database (the system catalog included) Get overview of disk usage. Sofware measure system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1054 The usage of double vs singular underscores or spaces in names as separator of name components Improve the readability of names. Find the number of names (identifiers) of user-defined database objects that contain two or more consecutive underscores or spaces as the separator of name components vs. the number of names that contain a single underscore or space to separate name components. Try to be consistent in the usage of underscores. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
1055 The use of xmin hidden column in views and routines Find the number of views and materialized views that have a column with the xid type and the number of routines that contain a UPDATE or a DELETE statement that search condition refers to the xmin column. If one uses optimistic approach for dealing with the concurrent modifications of data, then xmin values should be presented by views and used in routines that modify or delete rows. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
1056 Too generic names (columns) (aggregate view)(2) This query calculates the total cardinality of semantically weak column identifiers across the entire schema, encompassing both base tables and views. It applies a uniform definition of "generic" (e.g., flagging identifiers like id, type, date) regardless of the underlying object type. By treating table and view columns equivalently, the query provides a holistic metric of naming ambiguity, quantifying the overall prevalence of non-descriptive attributes within the database's public interface. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)