Eu uso o seguinte script rb.sql.
-- The Following script shows the time it takes to insert 1 million rows in a database.
-- I used it to determine that:
--
-- 1) Optimized Databases perform in relation to the hardware they run on,
-- and all the databases on 1 platform run within 10% of each other.
-- 2) When Rollback, Temp or Redo logs share the same underlying disks as
-- the "alan" table, the insert takes up to twice as long.
-- 3) When the rollback segments, Temp segments or redo log buffers are > 20 meg as
-- opposed to less than 1 meg, the inserts run 2 to 5 times faster.
-- By making the log_buffer and Rollback extents sizes close to 32k,
-- the inserts run up to 9 times slower.
set feedback off
set termout off
drop table alan;
set termout on
create table alan (name varchar2(30)) storage (initial 32k next 1m) logging noparallel storage(buffer_pool default);
insert into alan values ('alan');
insert into alan values ('alan1');
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
insert into alan select * from alan;
set timing on
insert /*+ PPEND */ into alan logging select * from alan /* This line shows the elapsed time. */
;
set timing off
-- select max(sequence#) from v$loghist;
set feedback on
set termout off
--drop table alan;
set termout on
Eu chamo-o com rb16.sql:
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
@rb
E eu chamo o rb16.sql com o call_rb16.sql:
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
@rb16
Como o script rb.sql se insere na tabela alan, você pode fazer vários usuários oracle e inserir de vários signons. O script rb.sql identifica os gargalos.