Rules tagged with: Performance
Efficient use of resources.
All 24 check SQL or PL/SQL code (G- codes). 1 also applies to PostgreSQL. Browse the rules below for explanations, examples and recommended fixes.
Most severe Performance rules
- G-3145 Avoid using SELECT * directly from a table or view. Blocker
- G-3310 Never commit within a cursor loop. Blocker
- G-4130 Always close locally opened cursors. Blocker
- G-2210 Avoid declaring NUMBER variables, constants or subtypes with no precision. Critical
- G-2220 Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values. Critical
- G-2230 Try to use SIMPLE_INTEGER datatype when appropriate. Critical
All 24 Performance rules
-
G-1240 Try to index foreign key columns.Major Reliability
-
G-2135 Avoid assigning values to local variables that are not used by a subsequent statement.Major Reliability
-
G-2210 Avoid declaring NUMBER variables, constants or subtypes with no precision.Critical Reliability
-
G-2220 Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values.Critical Reliability
-
G-2230 Try to use SIMPLE_INTEGER datatype when appropriate.Critical Reliability
-
G-3145 Avoid using SELECT * directly from a table or view.Blocker Reliability
-
G-3210 Always use BULK OPERATIONS (BULK COLLECT, FORALL) whenever you have to execute a DML statement for more than 4 times.Critical Reliability
-
G-3310 Never commit within a cursor loop.Blocker Reliability
-
G-4130 Always close locally opened cursors.Blocker Reliability
-
G-4230 Always use a COALESCE instead of a NVL command, if parameter 2 of the NVL function is a function call or a SELECT statement.Critical Reliability
-
G-4240 Always use a CASE instead of a NVL2 command if parameter 2 or 3 of NVL2 is either a function call or a SELECT statement.Critical Reliability
-
G-4360 Always use a WHILE loop to process a loose array.Critical Reliability
-
G-4390 Avoid use of unreferenced FOR loop indexes.Major Reliability
-
G-7160 Always explicitly state parameter mode.Major Reliability
-
G-7170 Avoid using an IN OUT parameter as IN or OUT only.Major Reliability
-
G-7210 Try to keep your packages small. Include only few procedures and functions that are used in the same context.Minor Reliability
-
G-7250 Never use RETURN in package initialization block.Major Reliability
-
G-7460 Try to define your packaged/standalone function deterministic if appropriate.Major Reliability
-
G-7730 Avoid multiple DML events per trigger.Minor Reliability
-
G-7740 Never handle multiple DML events per trigger if primary key is assigned in trigger.Critical Reliability
-
G-7810 Never use SQL inside PL/SQL to read sequence numbers (or SYSDATE).Critical Reliability
-
G-8110 Never use SELECT COUNT(*) if you are only interested in the existence of a row.Critical Reliability
-
G-8120 Never check existence of a row to decide whether to create it or not.Critical Reliability
-
G-8510 Always use dbms_application_info to track program process transiently.Critical Reliability
24 total
Related tags
Tags that appear on the same rules as Performance:
More ways to browse rules
- Trivadis PL/SQL & SQL guideline rules - Rules that implement the Trivadis coding guidelines.
- OWASP-related security rules - Rules that name an OWASP Top 10 risk category.
- Oracle APEX rules - Checks for APEX applications, pages, items and regions.
- PostgreSQL rules - Rules that also apply to PostgreSQL and PL/pgSQL.
- Security rules - All rules in the Security quality area.
- Reliability rules - Rules that prevent bugs and failures at run time.
- Maintainability rules - Rules for code that is easy to read and change.
- Rules by quality area - Security, reliability and maintainability.
- Rules by severity - From Blocker to Info.
- Rule profiles - Essential to Extreme: which rules are checked.
- All rules - Search and filter the complete rule set.