Copyright (c) 1996-2011, Oracle.All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
Command> connect "dsn=my_ttdb";
Connection successful: DSN=my_ttdb;UID=lutao;DataStore=C:\TimesTen\my_ttdb;Datab
aseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=C:\TimesTen\TT11
22~1\bin\ttdv1122.dll;LogDir=C:\TimesTen\log;TypeMode=0;
(Default setting AutoCommit=1)
Command> create or replace procedure ptest (n pls_integer ) IS
>i pls_integer := 0;
>num pls_integer;
>begin
>for i in 1..n loop
>num := num+1;
>insert into a(a) values(num);
>end loop;
>commit;
> end;
> /
Warning: Procedure created with compilation errors.
Command>
Command> show err
Errors for PROCEDURE PTEST:
LINE/COL ERROR
-------- -----------------------------------------------------------------
7/2PL/SQL: SQL Statement ignored
7/14 PL/SQL: ORA-00942: table or view does not exist
Command> create table a (a number);
Command> alter procedure ptest compile;
Procedure altered.
Command> set timing on
Command> exec ptest(1000000)
802: Database temporary space exhausted
6221: Temporary data partition free space insufficient to allocate 64736 bytes
of memory
6005: Lock request denied because of not enough temp space available: Tran 1.31
(pid 5012) wants Xni lock on end-table LUTAO.A.
8507: ORA-06512: at "LUTAO.PTEST", line 7
8507: ORA-06512: at line 1
Execution time (SQLExecute) = 4.206787 seconds.
The command failed.
Command>
1000行还能插入
Command> exec ptest(1000)
PL/SQL procedure successfully completed.
Execution time (SQLExecute) = 0.017570 seconds.
Command> select count(*) from a;
1 row found.
Execution time (SQLExecute + Fetch Loop) = 0.000700 seconds.
做个笛卡尔积,又不行了
Command> create table aa as select rownum rn from a,a;
2376: Duplicate entries in FROM clause
Execution time (SQLPrepare) = 0.024049 seconds.
The command failed.
Command> create table aa as select rownum rn from a,a a1;
802: Database permanent space exhausted
6220: Permanent data partition free space insufficient to allocate 2504 bytes o
f memory
Execution time (SQLExecute) = 4.591255 seconds.
The command failed.