1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
C:\app\Marius\diag\rdbms\diana\diana\trace>sqlplus mni/mni
SQL*Plus: Release 11.2.0.1.0 Production on Mer. Mai 18 22:22:13 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connecté à :
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> set timi on
SQL> Alter session set sql_trace = true
2 /
Session modifiée.
Ecoulé : 00 :00 :00.01
SQL> declare
2 type t_num IS TABLE of number;
3 a t_num:=t_num();
4 type t_data IS TABLE of tmp2.data%type;
5 l_s t_data;
6 begin
7 FOR i IN 1..100000 loop
8 a.extend;
9 a(i):=trunc(dbms_random.value(1,1000));
10 end loop;
11 forall i IN a.first..a.last INSERT INTO tmp2_temporary VALUES (a(i));
12 SELECT DATA bulk collect INTO l_s FROM tmp2 INNER JOIN tmp2_temporary ON n=n2;
13 dbms_output.put_line(l_s.count);
14 end;
15 /
Procédure PL/SQL terminée avec succès.
Ecoulé : 00 :00 :00.76
SQL> declare
2 a number_tt := number_tt();
3 type t_data IS TABLE of tmp2.data%type;
4 l_s t_data;
5 begin
6 FOR i IN 1..100000 loop
7 a.extend;
8 a(i):=trunc(dbms_random.value(1,1000));
9 end loop;
10 --
11 SELECT DATA bulk collect INTO l_s FROM tmp2 JOIN (SELECT column_value val FROM TABLE(a)) t ON tmp2.n = t.val;
12 end;
13 /
Procédure PL/SQL terminée avec succès.
Ecoulé : 00 :00 :00.64
SQL> Alter session set sql_trace = false
2 /
Session modifiée.
Ecoulé : 00 :00 :00.00
SQL> exit
tkprof diana_ora_9016.trc res.txt sort=execpu,fchcpu |
Partager