On Thu, Mar 14, 2002 at 09:17:44PM +0300, Marcelo Guelfi wrote:
>
> You can see diferences when you are inserting/deleting/updating records, but the
>performance of select statments in Perl is almost as good as a c program fetching in
>arrays.
>
> Set the $dbh->{RowCacheSize} to a significative value (not 1 !!!), try with 1000 or
>5000 to start.
> Have you set the array option in sqlplus?
>
> I just tried 2 scripts, one sqlplus and one perl. Both fetch all the rows from a
>500000 rows table and write it to a file:
> I run the scripts on the same dbms box (linux 2.4.16, oracle 9.0.1
>
> Perl (include connect and disconnect time) (DBI=1.21 DBD::Oracle=1.12)
> RowCacheSize = 0 time 167s
> RowCacheSize = 100 time 23s
> RowCacheSize = 500 time 19s
> RowCacheSize = 5000 time 19s
>
> sqlplus (just the query time)
> set array off time 47s
> set array 1000 time 29s
> set array 5000 time 29s
Ahhh. It's figures like this that make it all seem worthwhile.
Thanks :-)
Tim.