| DBIPR - DBI PRessure test for different methods of oracle insert |
DBIPR - DBI PRessure test for different methods of oracle insert
Version 0.01
Insert 1000 employees into emp table of scott user, in raw sql, cursor based insert, client side array based insert and server side array based insert. Working as pressure testing application for DML tunning. With DBI::Profile and oracle tkprof tools support, advanced measure is leave to experiment.
use DBIPR; # import all functions list below
raw_insert; trunc; # normal sql string concat method
cursor_insert; trunc; # cursor based version
array_insert; trunc; # perl array version
bulk_insert; trunc; # PL/SQL array version
session; # list all client sessions, for sql_trace & tkprof
Perl One-Liner command line works as:
$ perl -MDBIPR -e "for (1..100) {trunc; sleep 3; cursor_insert; sleep 3;}"
use raw sql 'insert into ... values ...' syntax and for loop
use prepared statment with ? and bind_param inside for loop
use bind_param_array and execute_array to work in one shot
use hash array (table of index) & forall insert to populate in pl/sql
use sql 'delete emp where deptno is null' to delete the test data
use v$process joined with v$session to report the sid, serial# of client programs. need to switch to sys account with account in dba group
Joe Jiang, <lamp.purl at gmail.com>
Please report any bugs or feature requests to
bug-dbipr at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc DBIPR
You can also look for information at:
Copyright 2007 Joe Jiang, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| DBIPR - DBI PRessure test for different methods of oracle insert |