Hello,

I use Perl 5.6.0, DBI 1.30 and DBD-Oracle 1.12.
While checking the performance, my Oracle-Tools discovered, that the
Database does two prepares for every 
execute.

My Perl-Code looks like this:

my $cur=$dbh->prepare($call);
die "Prepare-Error: $DBI::err\n$call\n$DBI::errstr\n" if
($DBI::err);
$cur->execute(@$vars);
die "Execute-Error:
$DBI::err\n$call\n$DBI::errstr\n" if
($DBI::err);
my @res=();
while (my $href=$cur->fetchrow_hashref) {
        die "Fetch-Error: $DBI::err\n$call\n$DBI::errstr\n" if ($DBI::err);
        for(keys %$href) {
                $href->{$_}=~s/[\s]*$//;
                $href->{$_}=~s/^[\s]//;
        }
        push(@res,$href);
}
$cur->finish;
return(\@res);

How could it be, that there is an prepare/execute ratio of 2?  I have execute much 
equal statements with bind-Values, and its very annoying that there are 400 prepares 
for 200 executes instead of one prepare.

Any hints?

Henning
-- 
                      ''' 
                     (0 0) 
       +-------oOO----(_)-------------+ 
       |Henning Meyer                 | 
       |SIEMENS AG  ICM N PG ES PD D 2|
       +--------------------oOO-------+ 
                    |__|__| 
                     || || 
                    ooO Ooo 

Reply via email to