NAME
DBIPR - DBI PRessure test for different methods of oracle insert
VERSION
Version 0.01
SYNOPSIS
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;}"
FUNCTIONS
raw_insert
use raw sql 'insert into ... values ...' syntax and for loop
cursor_insert
use prepared statment with ? and bind_param inside for loop
array_insert
use bind_param_array and execute_array to work in one shot
bulk_insert
use hash array (table of index) & forall insert to populate in pl/sql
trunc
use sql 'delete emp where deptno is null' to delete the test data
session
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
AUTHOR
Joe Jiang, <lamp.purl at gmail.com>
BUGS
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?Queue=DBIPR. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc DBIPR
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
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.