easy.permsoft.com | ||
.NET/Java PDF, Tiff, Barcode SDK LibraryGeneral type of all array values. General type of all delegates. General type of all enum values. General type of all exception values. General type of all sequence values. This is the nongeneric verision of the F# type seq<'a>, and all sequence and collection values are compatible with this type. General type of all comparable types. General type of all explicitly reclaimable resources. General type of all types supporting .NET formatting. General type of all values. Runtime representation of .NET types. General type of all value types. free barcode font for excel 2007, how to activate barcode in excel 2010, barcode font excel 2003 free, how to make barcodes in excel mac 2011, generate barcode in excel 2010, excel 2013 barcode font download, barcodes excel 2010 free, excel barcode, barcode font for excel download, barcode for excel 2007,Procedure created. Now let s create a procedure that uses bulk collect into an array a given number of records (passed as a parameter) at a time, and then loops through the array to output the records. The procedure bulk_collect does just that, outputting the data into a file called bulk_collect.txt: benchmark@ ORA92I> create or replace procedure bulk_collect ( p_limit_per_fetch in number default 100) 2 as 3 cursor c_x is 4 select x 5 from t1; 6 l_file_handle utl_file.file_type; 7 type number_table is table of number index by binary_integer; 8 l_x_list number_table; 9 begin 10 l_file_handle := utl_file.fopen( 'TEMP_DIR', 'bulk_collect.txt', 'W' ); 11 open c_x; 12 loop 13 fetch c_x bulk collect into l_x_list limit p_limit_per_fetch; 14 for i in 1..l_x_list.count 15 loop 16 utl_file.put_line( l_file_handle, l_x_list(i)); 17 end loop; 18 exit when c_x%notfound; Like all mutable data structures, two mutable record values or two values of type 'a ref may refer to the same reference cell this is called aliasing. Aliasing of immutable data structures is not a problem; no client consuming or inspecting the data values can detect that the values have been aliased. However, aliasing of mutable data can lead to problems in understanding code. In general, it is good practice to ensure that no two values currently in scope directly alias the same mutable data structures. The following example continues that from earlier and shows how an update to cell1 can affect the value returned by !cell2: 19 20 21 22 Most ASP .NET web applications contain, at the very least, a single web.config file that sits in the root directory. When you insert a new web.config file using Visual Studio 2005 (via the Website Add New Item menu option), the default XML looks something like the following (comments have been removed for clarity): < xml version="1.0" > <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings/> <connectionStrings/> <system.web> <compilation debug="false"/> <authentication mode="Windows"/> </system.web> </configuration> Note that the scope defined by <system.web> is where all of your ASP .NET security settings end up. The optional <appSettings> and <connectionStrings> elements provide a handy location to enter application-specific data and ADO.NET connections string values that may be obtained programmatically (see 10 for a close look at using and encrypting the new connectionStrings element). end loop; close c_x; end; / > let cell2 = cell1;; val cell2 : int ref > !cell2;; val it : int = 3 > cell1 := 7;; val it : unit = () > !cell2;; val it : int 7 In any case, when you have a web.config file located within the root directory, each subdirectory inherits the settings it defines. However, if you require, you may include specific web.config files that can effectively override the settings found in the parent web.config files higher up in the directory structure. Figure 5-6 illustrates one possible use of configuration inheritance. Procedure created. Next, we run the benchmark using the runstats utility: benchmark@ORA92> exec runstats_pkg.rs_start; PL/SQL procedure successfully completed. benchmark@ORA92> exec no_bulk_collect; PL/SQL procedure successfully completed. benchmark@ORA92> exec runstats_pkg.rs_middle; PL/SQL procedure successfully completed. benchmark@ORA92> exec bulk_collect(500); PL/SQL procedure successfully completed. benchmark@ORA92> exec runstats_pkg.rs_stop( 50 ); Run1 ran in 1844 hsecs Run2 ran in 1058 hsecs run 1 ran in 174.29% of the time Name Run1 LATCH.row cache enqueue latch 60 <-results trimmed to conserve space --> LATCH.cache buffers chains 1,006,701 Run1 latches total versus runs -- difference and pct Run1 Run2 Diff Pct 1,045,013 7,586 -1,037,427 13,775.55% PL/SQL procedure successfully completed.. As shown in bold in the preceding listing, the code without using bulk collect took almost twice the amount of time to complete. More important, perhaps, it consumed more than 130 times the latches consumed by the code that used bulk collect. In this case, I chose to use a limit of 500 records at a time; you can find a more optimal fetch limit size by trial and error. In conclusion, you can see that using bulk collect can significantly increase the performance of your PL/SQL code. You should take care, however, to use an appropriate limit on the number of records fetched in one iteration based on the total number of records and size per record. Run2 4 6,071 Diff -56 -1,000,630
|