Skip to main content


Showing posts from August, 2007

Blogging about 11g : Function Result Cache

From the 11g New Features Guide: "New in 11.1 is the ability to mark a PL/SQL function to indicate that its result should be cached to allow lookup, rather than recalculation, on the next access when the same parameter values are called. This function result cache saves significant space and time. Oracle does this transparently using the input actuals as the lookup key. The cache is system-wide so that all distinct sessions invoking the function benefits. If the result for a given set of actuals changes, you can use constructs to invalidate the cache entry so that it will be properly recalculated on the next access. This feature is especially useful when the function returns a value that is calculated from data selected from schema-level tables. For such uses, the invalidation constructs are simple and declarative. Concurrent, multi-user applications that use this feature experience better response times. Applications that implement a session-private scheme consume significantly l

Blogging about 11g : Allow Sequences in PL/SQL Expressions

My company took part in the Oracle 11 g Beta test and I also ran some (small) test on the new PL/SQL features. One of them is that access to sequences is allowed in PL/SQL, so no need to "SELECT tst_seq.nextval INTO n FROM dual" anymore! DECLARE   n NUMBER; BEGIN   SELECT seq.nextval   INTO n   FROM dual; END; can now be coded as DECLARE   n NUMBER; BEGIN   n := seq.nextval; END; For "currval" the same solution is possible. So there is no need for a cursor anymore, but more important to me : the usability and readability of the PL/SQL is code is enhanced by this new feature.