-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Feb 03, 2004 at 09:07:24AM +0100, Kristian Nielsen wrote:
> Could you give an example of where you need to use C instead of Perl for
> speed in DB access? I would think that with proper use of DBI, any time
> spent in the client Perl code would be dwarfed by time spent in OCI and
> in the server.

Long story, since our software is approaching 7 years old.  Basically we have an 
abstraction class that implements a database row (very analogous to Class::DBI, 
but Class::DBI wasn't mature enough at the time I started writing this layer, 
which was sometime in 1999).  My original pure Perl implementation was abysmally 
slow when dealing with large record sets, which is sadly our typical production 
case.  That could have been due to my (lack of) ability with Perl at the time, 
but time was of the essence, so I broke out the sledgehammer that is C and 
gained 100-200% on various operations.  Then I realized the cost of the data 
going Perl->C->Perl->C->Perl (DBD::Oracle->OCI->Perl->our code), so I started 
calling OCI directly and gained another 100-200%.

Perhaps it's time I took another stab at a pure Perl implementation, maybe 
trying to fix the deficiencies in Class::DBI (lack of multi-column key 
support, inability to change primary key values) and using it.  I'm getting sick 
of maintaining this C code anyway.  I'd much rather maintain Tim's C code, his 
stuff is prettier than mine :)

- -- 
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer/DBE, Core Technology Developer
The IQ Group, Inc. <http://www.theiqgroup.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQFAH/QyA4aoazQ9p2cRAjX4AKDfUHrvJvEjZNZtHYB1Rv24oS9shgCfVbT8
PDeCNBGQyYcg6nqX+LBFheY=
=PVto
-----END PGP SIGNATURE-----

Reply via email to