On Thu, Mar 14, 2002 at 06:03:40PM -0600, Chris Starling wrote:
> 
> my $dbh = DBI->connect("dbi:Oracle:$dbinstance", $dbuser, $dbpasswd);
> my $sth = $dbh->prepare($sql);
> $sth->execute;
> my ($col1, $col2, $col3, $col4);
> $sth->bind_columns( \($col1, $col2, $col3, $col4) );
> while ($sth->fetch) {}
> 
> Is there some way to tweak DBD::Oracle or DBI to make it run faster? 

RowCacheSize, as others have said.

But check that it's actually being set by adding $dbh->trace(8)
before the prepare (and $sth->trace(0) after the execute).
Look for a line in the trace like
    dbd_describe'd %d columns (row bytes: %d max, %d est avg, cache: %d)

The cache: value is the size of the row cache.

Tim.

p.s. Some old versions of DBD::Oracle had a bug whereby you needed to
do something like "my $dummy = $sth->{NAME};" between the prepare
and the execute in order to get the row cache setup.

Reply via email to