Processing Requirements for a large amount of data in the database: a large amount of product order information is retrieved from the ORACLE database, then written into the document in the specified format, and then parsed to the business management interface in JAVA for users to query and use, write one document for every 100000 records. Method 1: (1) Use a query statement to calculate the number of database records. For example, select nvl (COUNT (*), 0) www.2cto.com INTO: ll_Counts FROM ordering table WHERE filter rules;
(2) then calculate the number of documents required to save these records lFileCount = ll_Counts/100000; lSurplus = ll_Counts % 100000; if (lSurplus> 0) {lFileCount = lFileCount + 1 ;} (3) create all files. (4) traverse the records of the database order table again, and then write each 100000 records into each file created above. This method is simple and clear, because the data volume is large, the database was queried twice, which seriously affected the performance. The execution takes a long time. The second method is to traverse the records of the database order table. The first record of every 100000 records starts to create a file, and then write 100000 records. This method only queries the database once, improving the performance a lot. Author cancan8538