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.
#381. Generated stored base table columns that expression does not refer to any column
INFORMATION_SCHEMA onlyFind generated stored base table columns that expression does not refer to any column of the table. It could be that there will be a constant value in every row in case of this column. The support of generated columns was added to PostgreSQL 12.
#382. Generated stored base table columns duplicates another column in the table
INFORMATION_SCHEMA onlyFind generated stored columns in PostgreSQL base tables that duplicate other columns in the table.
#383. Generated stored base table columns
INFORMATION_SCHEMA onlyFind 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.
#384. Referential degree of tables (ver 2)
system catalog base tables onlyFind how many base tables are referenced from a base table by using foreign keys.
#385. The number of referencing base tables
system catalog base tables onlyFind how many base tables reference to a base table by using foreign keys. The more references there are the more impact the change of the table could have to the overall system.
#386. The number of tables based on the number of columns
INFORMATION_SCHEMA+system catalog base tablesFind how many tables with a certain range of the number of columns there are in the database.
#387. Identifiers that explicitly say that they carry no meaning
INFORMATION_SCHEMA+system catalog base tablesFind identifiers that explicitly say that they carry no meaning. Such identifier is called "unnamed" or "anonymous".
#388. Incorrect characterization of a user-defined routine as an "immutable" routine
INFORMATION_SCHEMA+system catalog base tablesFind immutable routines that contain SELECT statements from a database (including SELECT .. FOR UPDATE), INSERT, UPDATE, DELETE, or LOCK statement. The DBMS should get a correct background information about the behaviour of a routine. Immutable routines should not have side effects and should also not ask data from a database because it could change over time. Immutable routines cannot lock tables or its specific rows.
#389. A state machine is implemented with the help of a state classifier table
system catalog base tables onlyFind implementations of state machines that use a state classifier table.
#390. A state machine is implemented with the help of an enumeration type
INFORMATION_SCHEMA+system catalog base tablesFind implementations of state machines that uses an enumeration type.
#391. Perhaps a state machine is implemented with timestamp columns
INFORMATION_SCHEMA onlyFind implementations of state machines that uses a set of columns with a timestamp type.
#392. Perhaps a state machine is implemented with Boolean columns
INFORMATION_SCHEMA+system catalog base tablesFind implementations of state machines that uses a set of one or more Boolean columns. These columns could have the type Boolean or could probably (based on the column name and non-participation in a foreign key) contain values that represent truth values.
#393. ON DELETE SET NULL is probably missing
system catalog base tables onlyFind implementations of the adjacency list design pattern, where the corresponding foreign key columns are optional but the foreign key constraint does not have ON DELETE SET NULL compensating action. Implement adjacency list correctly.
#394. Frequency of column name lengths based on the table type
INFORMATION_SCHEMA+system catalog base tablesFind in case of base tables, materialized views, and views the number of columns based on the length of the column name.
#395. Table inheritance (path view)
system catalog base tables onlyFind in case of each base table that participates in a table inheritance hierarchy the path to the table from the top-level table. Use table inheritance carefully because, for instance, certain constraints are not inherited and must be redefined on child tables. Also make sure that the identifier of each child table in an inheritance hierarchy is a hyponym of the identifier of its parent table.
#396. Recursive relationships with the same source and target
system catalog base tables onlyFind incorrectly implemented adjacency lists.
#397. Textual columns that have a secondary index but the operator class for the column does not support pattern matching
INFORMATION_SCHEMA+system catalog base tablesFind indexed textual columns where the indexing does not consider the possibility of pattern-based search. Such columns do not have an index where the used operator class makes the index suitable for use by queries involving pattern matching expressions.
#398. Identical indexes
system catalog base tables onlyFind indexes that are identical, i.e., have the same properties, including uniqueness. The query considers all types of indexes, including indexes that have been automatically created to support a constraint and function-based indexes.
#399. Non-foreign key indexes that have been named as foreign key indexes
INFORMATION_SCHEMA+system catalog base tablesFind indexes that are not on a foreign key column but the name of the index contains ixfk or idxfk.
#400. Unused indexes
INFORMATION_SCHEMA+system catalog base tablesFind indexes that are not used by the DBMS. Remember that indexes are not a "free lunch" and they slow down the processes of updating data.
| # | Name(activate to sort ascending) | Goal(sorted ascending, activate to sort descending) | Type(activate to sort ascending) | Data source(activate to sort ascending) | Last update(activate to sort ascending) | License | Actions |
|---|---|---|---|---|---|---|---|
| 381 | Generated stored base table columns that expression does not refer to any column | Find generated stored base table columns that expression does not refer to any column of the table. It could be that there will be a constant value in every row in case of this column. The support of generated columns was added to PostgreSQL 12. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 382 | Generated stored base table columns duplicates another column in the table | Find generated stored columns in PostgreSQL base tables that duplicate other columns in the table. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 383 | Generated stored base table columns | Find 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. | General | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 384 | Referential degree of tables (ver 2) | Find how many base tables are referenced from a base table by using foreign keys. | Sofware measure | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 385 | The number of referencing base tables | Find how many base tables reference to a base table by using foreign keys. The more references there are the more impact the change of the table could have to the overall system. | Sofware measure | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 386 | The number of tables based on the number of columns | Find how many tables with a certain range of the number of columns there are in the database. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 387 | Identifiers that explicitly say that they carry no meaning | Find identifiers that explicitly say that they carry no meaning. Such identifier is called "unnamed" or "anonymous". | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 388 | Incorrect characterization of a user-defined routine as an "immutable" routine | Find immutable routines that contain SELECT statements from a database (including SELECT .. FOR UPDATE), INSERT, UPDATE, DELETE, or LOCK statement. The DBMS should get a correct background information about the behaviour of a routine. Immutable routines should not have side effects and should also not ask data from a database because it could change over time. Immutable routines cannot lock tables or its specific rows. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 389 | A state machine is implemented with the help of a state classifier table | Find implementations of state machines that use a state classifier table. | General | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 390 | A state machine is implemented with the help of an enumeration type | Find implementations of state machines that uses an enumeration type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 391 | Perhaps a state machine is implemented with timestamp columns | Find implementations of state machines that uses a set of columns with a timestamp type. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 392 | Perhaps a state machine is implemented with Boolean columns | Find implementations of state machines that uses a set of one or more Boolean columns. These columns could have the type Boolean or could probably (based on the column name and non-participation in a foreign key) contain values that represent truth values. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 393 | ON DELETE SET NULL is probably missing | Find implementations of the adjacency list design pattern, where the corresponding foreign key columns are optional but the foreign key constraint does not have ON DELETE SET NULL compensating action. Implement adjacency list correctly. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 394 | Frequency of column name lengths based on the table type | Find in case of base tables, materialized views, and views the number of columns based on the length of the column name. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 395 | Table inheritance (path view) | Find in case of each base table that participates in a table inheritance hierarchy the path to the table from the top-level table. Use table inheritance carefully because, for instance, certain constraints are not inherited and must be redefined on child tables. Also make sure that the identifier of each child table in an inheritance hierarchy is a hyponym of the identifier of its parent table. | General | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 396 | Recursive relationships with the same source and target | Find incorrectly implemented adjacency lists. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 397 | Textual columns that have a secondary index but the operator class for the column does not support pattern matching | Find indexed textual columns where the indexing does not consider the possibility of pattern-based search. Such columns do not have an index where the used operator class makes the index suitable for use by queries involving pattern matching expressions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 398 | Identical indexes | Find indexes that are identical, i.e., have the same properties, including uniqueness. The query considers all types of indexes, including indexes that have been automatically created to support a constraint and function-based indexes. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 399 | Non-foreign key indexes that have been named as foreign key indexes | Find indexes that are not on a foreign key column but the name of the index contains ixfk or idxfk. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 400 | Unused indexes | Find indexes that are not used by the DBMS. Remember that indexes are not a "free lunch" and they slow down the processes of updating data. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) |