Databases Reference
In-Depth Information
In step 4, the same function as in the previous step is created, declaring the array parameter
with the IN OUT NOCOPY clause. The parameter is then passed by reference—a pointer to the
actual data is passed to the function—so the function directly manipulates the original array
and its copy.
In step 5, we populate an array with 10 million records, and we loop through these elements
to calculate their sum—using the functions in step 3 and step 4—measuring the time required
to perform the operations. The output is as follows:
Finally, in step 6, we drop the objects created in this recipe.
In this recipe, we have used the DBMS_OUTPUT package to
send messages from our stored procedure, using the PUT_LINE
procedure. You can find more on this package in the documentation:
http://download.oracle.com/docs/cd/E14072_01/
appdev.112/e10577/d_output.htm
 
Search WWH ::




Custom Search