| Goal | This query identifies and categorizes the distinct functional tasks implemented via triggers across the database schema. Rather than simply listing individual trigger instances, it aggregates triggers on the same or multiple tables that execute identical logic or share the same underlying routine (for example, maintaining audit timestamps or logging change history) into a single functional responsibility. This high-level inventory provides developers and database architects with a clear overview of the responsibilities delegated to the database tier, helping identify opportunities for code consolidation and standardization. |
|---|---|
| Type | General Overview of some aspect of the database. |
| License | MIT (opens in new tab) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
Fixing Suggestion
Review the grouped trigger tasks to identify opportunities for refactoring. Replace fragmented trigger functions performing identical tasks across different tables with a unified, reusable trigger routine.
Collections
This query belongs to the following collections:
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
| Name | Description |
|---|---|
| Find problems by overview | Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not . |
Categories
This query is classified under the following categories:
Triggers and rules
Queries of this category provide information about triggers and rules in a database.
| Name | Description |
|---|---|
| Triggers and rules | Queries of this category provide information about triggers and rules in a database. |