Monday, March 1, 2010

PL/SQL performance enhancing features

Runtime optimization of fetch loops (10g onwards)
only works for FOR loops involving cursors
eg FOR cust_rec in (select * from customer)
LOOP
END LOOP

and FOR cust_rec in cust_cur
LOOP
END LOOP

Oracle in the above cases post ver 10g will fetch upto 100 rows in each fetch rather than 1
record each time.

This won't work with
open cursor
loop
exit when cursor%NOTFOUND
fetch cursorname into
end loop
close cursorname

source : Page 798 (Oracle PL/SQL by Steven Feuerstein)

Data Caching techniques
- Package Based Caching
- caching variables/constants
- caching table
- caching most commonly accessed rows of a table (just-in-time caching of table data)

Deterministic function caching

Function result caching

No comments:

Post a Comment

Followers

About Me

Torrance, CA, United States