ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Transfer bad PL/SQL into good
Maik Becker Alexandra Welzel
Where are we from?
Safety instructions
Unused or unnecessary code
Unused or unnecessary code
Unused or unnecessary code
Unused or unnecessary code
Unused or unnecessary code
Unused or unnecessary code
Unused or unnecessary code
Unused or unnecessary code
FUNCTION next_store_seq
RETURN NUMBER
IS
next_id NUMBER;
BEGIN
SELECT TRUNC (DBMS_RANDOM.VALUE (1000, 9999))
* bit_shift + cbo_datastore_seq.NEXTVAL
INTO next_id
FROM DUAL;
RETURN next_id;
END next_store_seq;
FUNCTION next_store_seq
RETURN NUMBER
IS
BEGIN
RETURN TRUNC (DBMS_RANDOM.VALUE (1000, 9999))
* bit_shift + cbo_datastore_seq.NEXTVAL;
END next_store_seq;
Unused or unnecessary code
Unused or unnecessary code
Exception Handling
Exception Handling
Exception Handling
Exception Handling
Exception Handling
?
Exception Handling
Exception Handling
Exception Handling
Exception Handling
Code Control Structure
Code Control Structure
Code Control Structure
Code Control Structure
Code Control Structure
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
General Programming Issues
Potential Performance Issues
Potential Performance Issues
Potential Performance Issues
Potential Performance Issues
Potential Performance Issues
?
Potential Performance Issues
Potential Performance Issues
Potential Performance Issues
SQL Statement
Syntax Check Semantic Check
Shared Pool
Check
Optimization
Row Source
Generation
Execution
Generation of
multiple
execution plans
Generation of
query plan
Potential Performance Issues
Potential Performance Issues
SQL Statement
Syntax Check Semantic Check
Shared Pool
Check
Optimization
Row Source
Generation
Execution
Generation of
multiple
execution plans
Generation of
query plan
Potential Performance Issues
Potential Performance Issues
SQL Statement
Syntax Check Semantic Check
Shared Pool
Check
Optimization
Row Source
Generation
Execution
Generation of
multiple
execution plans
Generation of
query plan
Potential Performance Issues
Potential Performance Issues
Potential Performance Issues
Potential Performance Issues
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
PL/SQL and APEX
Maik Becker Alexandra Welzel

More Related Content

Transfer_bad_PLSQL_into_good_HROUG23.pdf