CREATE TABLE blktest (num NUMBER( 20), name varchar2( 50));
CREATE OR REPLACE PROCEDURE bulktest IS
TYPE numtab IS TABLE OF NUMBER (20) INDEX BY BINARY_INTEGER;
TYPE nametab IS TABLE OF VARCHAR2 (50) INDEX BY BINARY_INTEGER;
pnums numtab;
pnames nametab;
t1 NUMBER;
t2 NUMBER;
t3 NUMBER;
BEGIN
FOR j IN 1 .. 1000000
LOOP
pnums(j) := j;
pnames(j) := 'Seq No. ' || to_char(j);
END LOOP ;
SELECT dbms_utility.get_time
INTO t1
FROM dual;
FOR i IN 1 .. 1000000
LOOP
INSERT INTO blktest
VALUES
(pnums(i)
,pnames(i));
END LOOP ;
SELECT dbms_utility.get_time
INTO t2
FROM dual;
FORALL i IN 1 .. 1000000
INSERT INTO blktest
VALUES
(pnums(i)
,pnames(i));
SELECT dbms_utility.get_time
INTO t3
FROM dual;
dbms_output.put_line( 'Execution Time (hsecs)');
dbms_output.put_line( '---------------------');
dbms_output.put_line( 'FOR loop: ' || to_char(t2 - t1));
dbms_output.put_line( 'FORALL: ' || to_char(t3 - t2));
END;
Execution Time (hsecs)
---------------------
FOR loop: 5747
FORALL: 90
分享到:
相关推荐
ORACLE常用命令 一、ORACLE的启动和关闭 1、在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a、启动ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>startup ...
In explaining number conversions, for example, he explores Oracle’s different ways of formatting numbers, then details the behavior of the to_number function under different conditions (with and ...
unreadable Consider for example the simple question: How does Oracle do a logical I O then take a look at structure x$kcbsw which is a list of all the functions that Oracle might call to visit a ...
The FORALL statement can handle associate arrays and nested tables with deleted elements. You can now use this performance construct in more situations than before, and avoid the need to copy elements...
Changing password for user oracle. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. 创建grid目录结构...
It’s good to have an idea of how B-tree indexes (for example) actually work so that we can understand their strengths and weaknesses. Then we can move on to the idea of function-based indexes—...
That is the Oracle code !! You can use it improve your ability!! You know if you don't use the DATABASE and The Commnad that you...All example in the RAR File!! Hope you can use it and it can help you!!!
4 4 4 D:\ORACLE\ORADATA\XJ\EXAMPLE01.DBF 4096 5 5 5 D:\ORACLE\ORADATA\XJ\INDX01.DBF 4096 6 6 6 D:\ORACLE\ORADATA\XJ\ODM01.DBF 4096 7 7 7 D:\ORACLE\ORADATA\XJ\TOOLS03.DBF 4096 7 8 8 D:\ORACLE\...
- The script to which the character belongs is supported by the JRE installation on which SQL Developer is running � for example, appropriate fonts are available � and - The script does not ...
You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the ...
Chapter 5, PL/Vision Package Specifications provides a brief summary of all of the specifications for the PL/Vision packages, and is marked with a thumb-tab for quick reference. Part III: Building ...
Written by a MySQL Community Manager for Oracle, MySQL and JSON: A Practical Programming Guide shows how to quickly get started using JSON with MySQL and clearly explains the latest tools and ...
Preset code formatting rule added for Oracle VARRAY. Preset code formatting rule added for DEFAULT VALUES in INSERT/UPDATE statements in Transact-SQL. Database name and schema name completion is now...
All of the information in this book has been handpicked to help you study for the Oracle 12c upgrade exam. Each chapter has been written with the objective of helping you pass this exam with ease. ...
Support has been added for Oracle12c extended strings (> 4000 bytes) The align button has a new Hide editor option to show only the result set The align button has a new Window width option to resize ...
You can consider a language element as supported for all interfaces, on all operating systems, and for SpeedScript unless otherwise indicated in the language element description. The platform ...
Suppose your company wants to sell products online. You have a database that gives the price and inventory status of each item. However, your database doesn’t speak ...Web browsers need.... For example,
Support has been added for Oracle12c read privileges for tables and views. Scripts generated by Export User Objects and Export Tables now have user-defined initialization and finalization. These files...
window), for example: include:process:327 * Version 2.07: o Fixed the flickering on automatic refresh. * Version 2.06: o Fixed issue: The properties dialog-box and other windows opened in the ...
Support has been added for Oracle12c read privileges for tables and views. Scripts generated by Export User Objects and Export Tables now have user-defined initialization and finalization. These files...