Filter Queries
Found 1053 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.
#1001. Unused domains (for base table columns and parameters)
system catalog base tables onlyFind domains that are not used in case of any base table column and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.
#1002. Unused enumerated types (for base table columns, domains, and parameters)
INFORMATION_SCHEMA+system catalog base tablesFind enumerated types that are not used in case of any base table column, domain, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.
#1003. Unused foreign data wrappers
INFORMATION_SCHEMA onlyFind foreign data wrappers that do not have any associated foreign servers.
#1004. Unused foreign servers
INFORMATION_SCHEMA onlyFind foreign servers that do not have any associated foreign tables.
#1005. 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.
#1006. Unused indexes (2)
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.
#1007. Unused named input parameters
INFORMATION_SCHEMA+system catalog base tablesFind named input parameters that are not referenced in the routine body. All the parameters that are presented in the routine signature declaration must be used in its body. Otherwise these are dead code elements.
#1008. Unused schemas
system catalog base tables onlyDo not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.
#1009. Unused trigger functions
INFORMATION_SCHEMA+system catalog base tablesDo not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.
#1010. Update prevention may prevent legal updates
INFORMATION_SCHEMA+system catalog base tablesFind triggers that try prevent updating data in a certain column but prevent also certain legal updates - updates that write to a field a value that was in the field before the update.
#1011. UPDATE triggers
INFORMATION_SCHEMA onlyFind all UPDATE triggers. Make sure that they specify a correct set of columns in which data modification will fire the trigger.
#1012. UPDATE triggers where updated columns have not been specified (the trigger could executed too often)
INFORMATION_SCHEMA onlyFind UPDATE triggers where updated columns are not specified. These triggers could be executed too often because unneeded executions are not prevented.
#1013. UPDATE triggers where WHEN clause has not been specified (the trigger could executed too often)
INFORMATION_SCHEMA onlyFind UPDATE triggers where WHEN clause is not specified. These triggers could be executed too often because unneeded executions are not prevented.
#1014. Usage of base tables
INFORMATION_SCHEMA+system catalog base tablesFind for each derived table the list of base tables that are used by the derived table.
#1015. Used indexes
INFORMATION_SCHEMA+system catalog base tablesFind indexes that are used by the DBMS.
#1016. Use invocation of a precise function instead of casting in a default value expression
INFORMATION_SCHEMA onlyBe precise and write as little code as possible. Prefer expressions with simple invocations of functions like localtimestamp, current_timestamp, and current_date over expressions like (now())::date. Find table columns that have a default value that casts the type of the returned value of a non-deterministic function (now, localtimestamp, current_timestamp, and current_date).
#1017. Useless type indication
INFORMATION_SCHEMA+system catalog base tablesFind columns and parameters where the type of the identifier is perhaps explicitly indicated in the name.
#1018. Useless type indication (2)
INFORMATION_SCHEMA+system catalog base tablesFind columns and parameters where the type of the identifier is perhaps explicitly indicated in the name.
#1019. User-defined composite types
system catalog base tables onlyFind composite types that are created by a user, i.e., the type is not created automatically by the database management system based on a relation.
#1020. User-defined derived tables
INFORMATION_SCHEMA+system catalog base tablesFind user-defined views and materialized views. Pay attention to the outer join operations. One should use these if and only if there is a real need for them. Otherwise they just reduce performance. On the other hand, pay attention that outer join is used where it is logically needed.
| # | Name | Goal | Type | Data source | Last update (sorted descending) | License | Actions |
|---|---|---|---|---|---|---|---|
| 1001 | Unused domains (for base table columns and parameters) | Find domains that are not used in case of any base table column and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 1002 | Unused enumerated types (for base table columns, domains, and parameters) | Find enumerated types that are not used in case of any base table column, domain, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1003 | Unused foreign data wrappers | Find foreign data wrappers that do not have any associated foreign servers. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 1004 | Unused foreign servers | Find foreign servers that do not have any associated foreign tables. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 1005 | 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) | |
| 1006 | Unused indexes (2) | 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) | |
| 1007 | Unused named input parameters | Find named input parameters that are not referenced in the routine body. All the parameters that are presented in the routine signature declaration must be used in its body. Otherwise these are dead code elements. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1008 | Unused schemas | Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 1009 | Unused trigger functions | Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1010 | Update prevention may prevent legal updates | Find triggers that try prevent updating data in a certain column but prevent also certain legal updates - updates that write to a field a value that was in the field before the update. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1011 | UPDATE triggers | Find all UPDATE triggers. Make sure that they specify a correct set of columns in which data modification will fire the trigger. | General | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 1012 | UPDATE triggers where updated columns have not been specified (the trigger could executed too often) | Find UPDATE triggers where updated columns are not specified. These triggers could be executed too often because unneeded executions are not prevented. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 1013 | UPDATE triggers where WHEN clause has not been specified (the trigger could executed too often) | Find UPDATE triggers where WHEN clause is not specified. These triggers could be executed too often because unneeded executions are not prevented. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 1014 | Usage of base tables | Find for each derived table the list of base tables that are used by the derived table. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1015 | Used indexes | Find indexes that are used by the DBMS. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1016 | Use invocation of a precise function instead of casting in a default value expression | Be precise and write as little code as possible. Prefer expressions with simple invocations of functions like localtimestamp, current_timestamp, and current_date over expressions like (now())::date. Find table columns that have a default value that casts the type of the returned value of a non-deterministic function (now, localtimestamp, current_timestamp, and current_date). | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 1017 | Useless type indication | Find columns and parameters where the type of the identifier is perhaps explicitly indicated in the name. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1018 | Useless type indication (2) | Find columns and parameters where the type of the identifier is perhaps explicitly indicated in the name. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1019 | User-defined composite types | Find composite types that are created by a user, i.e., the type is not created automatically by the database management system based on a relation. | General | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 1020 | User-defined derived tables | Find user-defined views and materialized views. Pay attention to the outer join operations. One should use these if and only if there is a real need for them. Otherwise they just reduce performance. On the other hand, pay attention that outer join is used where it is logically needed. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) |