Filter Queries

Found 997 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 relatively small amount of data, which is in the system catalog of a database.
  • Statistics about the catalog content and project home in GitHub that has additional information.

# Name Goal Type Data source Last update License
361 Vacuum and analyze status of base tables Find for each base table the last time when the table has been vacuumed or analyzed (either manually or automatically). General system catalog base tables only 2023-10-06 13:48 MIT License View
362 The total size of all indexes (system catalog excluded) Sofware measure system catalog base tables only 2023-05-14 11:04 MIT License View
363 The total size of all tables (system catalog excluded) Sofware measure system catalog base tables only 2023-05-14 11:04 MIT License View
364 Check as to wheteher the names of columns are in the plural or in the singular form (English version) (aggregate view) Check as to wheteher the names of table columns are in the plural or in the singular form. Make sure that you are consistent in naming. Show the number of columns that name is in plural or in singular by table type. Sofware measure INFORMATION_SCHEMA+system catalog base tables 2023-03-20 13:19 MIT License View
365 Check as to wheteher the names of columns are in the plural or in the singular form (English version) Check as to wheteher the names of table columns are in the plural or in the singular form. Make sure that you are consistent in naming. General INFORMATION_SCHEMA+system catalog base tables 2023-03-20 13:18 MIT License View
366 Too generic names (columns) (there is a column with a more specific name in the table) Find column names in case of which the same table has another column (with more specific name) that name contains the column name in the end or in the beginning. For instance, a base table has columns parent and root_parent and the former col-umn name is too generic, i.e., it should be more specific. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-03-20 01:01 MIT License View
367 Simple primary keys that column name does not contain the table name Find simple primary keys that column name does not contain the table name. The naming should be clear and consistent. Problem detection system catalog base tables only 2023-03-19 10:35 MIT License View
368 Do not use approach that one size fits all (primary key columns) Find base base tables have the simple primary key that contains the column with the (case insensitive) name id and an integer type. In addition, the primary key values are generated automatically by the system by using a sequence generator. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-03-18 20:58 MIT License View
369 Very similar column names Find the pairs of table columns that name is different only by one symbol and that have the same type and/or domain. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-03-18 20:25 MIT License View
370 The name of the base table that implements a binary relationship type does not explain the meaning of the relationship Find base tables that implement a binary relationship type (have two foreign keys) and the name of the table consist of the names of tables that this (intermediate) table connect. The names should be derived from the domain. For instance, instead of name Course_Lecturer it is better to have name Teaching. Problem detection system catalog base tables only 2023-03-18 17:58 MIT License View
371 Perhaps a too generic foreign key column name Find the names of foreign key columns that are too generic. The expressive names of table columns allow database users better and more quickly understand the meaning of data in the database. A person could participate in a process or be associated with an object due to different reasons. Thus, foreign key column names like isik_id, person_id, tootaja_id, worker_id etc. are too generic. The name should refer (also) to the reason why the person is connected. Problem detection system catalog base tables only 2023-03-15 18:27 MIT License View
372 Unnamed parameters Find unnamed parameters in PL/PGSQL routines that do not declare aliases for parameters and in SQL routines. Avoid unnamed parameters because dependency on position in case of referencing the parameters makes evolving the code more difficult. In case of unnamed parameters - if one changes the order of parameters in the routine signature, then one has to change the body of the routine in order to use correct references. The bigger is the number of parameters in a routine the more the unnamed parameters make it more difficult to understand the routine. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-03-15 18:16 MIT License View
373 SQL function does not return a value Find SQL functions that do not return a value (return VOID) but the SQL statement in the function has RETURNING clause. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-02-27 17:28 MIT License View
374 Parameter name is the same as the name of a used column If the name of a routine parameter and the name of a column of a table that is used in the routine are the same, then it makes it more difficult to understand the code. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-01-20 13:54 MIT License View
375 Parameter name is the same as the name of a used column (ver 2) If the name of a routine parameter and the name of a column of a table that is used in the routine are the same, then it makes it more difficult to understand the code. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-01-20 13:54 MIT License View
376 Patterns of the names of columns of simple primary keys Find the patterns of the names of columns of simple primary keys. Make sure that the naming is consistent. Ideally, the names should indicate as to whether the column is a surrogate or a natural key column. PostgreSQL 14 added primary keys, unique constraints, and foreign keys to system catalogs. Thus the query was modified to exclude the results from the system catalog. General system catalog base tables only 2023-01-20 13:40 MIT License View
377 Too generic names (foreign key columns) Find foreign key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix that describes the nature of relationship with the referenced table or at least referes to the referenced table. These are too generic names. Problem detection system catalog base tables only 2023-01-20 12:37 MIT License View
378 Too generic names (candidate key columns) Find candidate key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix. These are too generic names. Problem detection system catalog base tables only 2023-01-20 12:35 MIT License View
379 Comments of schemas, sequences, types, domains, domain constraints, and event triggers Find all the comments that have been added with a COMMENT statement to schemas, sequences, types, domains, and event triggers. General system catalog base tables only 2023-01-19 15:04 MIT License View
380 Too short or missing comments of derived tables and routines Find views, materialized views, and user-defined routines that do not have a comment at all or the comment is shorter than twice the length of the object name, or the comment states that it is missing (TODO). You should give information to future developers and maintainers of the system (including the future version of yourself). Do not just repeat the name in the comment (with perhaps some rewording). Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-01-19 12:56 MIT License View