On Wed, 23 Jan 2008 16:20:48 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote: 

JS> On Jan 23, 2008 2:07 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I found one of the problems is that you forcibly set RaiseError to 1 in
>> a lot of places, in Rose::DB and Rose::DB::Object.  Why override the
>> connect_options?
>> 
>> My code is working with do_transaction for now, but begin_work/commit
>> should really be shown with an eval in the Rose::DB SYNOPSIS.  I got the
>> impression they would not die from the Rose::DB docs, so their
>> exceptions were killing an outer eval, and rollback() was not called...
>> I'd show you the code but it's not interesting or pretty.

JS> The only instances I can think of off the top of my head are
JS> local()ized changes so that I can use eval blocks internally for error
JS> handling.  For example:

JS>   sub whatever
JS>   {
JS>     ...
JS>     eval
JS>     {
JS>       local $dbh->{'RaiseError'} = 1;
JS>       # do stuff
JS>     };

JS>     if($@) { ... } # handler error
JS>     else   { ... } # or success
JS>   }

JS> If there's an instance where RaiseError is altered outside and eval
JS> block and/or not changed back before a sub returns, it's probably a
JS> bug, so send me any cases you've found that demonstrate this.

No, those are the places I saw.  Something else must have been causing
the problems then, and it's sort of annoying that I can't replicate them
now.  Sorry, but I was playing with several versions of the code and
didn't commit any to VCS...  I'll try to save them next time.

>> I ran with DBI_TRACE set high and checked that the DBD commit was only
>> called as many times as I specified.  So I'm using transactions to
>> insert the rows, and RDBO is just not able to handle the load for my
>> particular task.  With COPY FROM, I can insert about 10-20 times faster
>> than RDBO, so I'll have to stick with that.  I'll mimic the RDBO SQL
>> statements and just run them I guess...

JS> Did you try plain DBI?  I suspect even that will be 10-15 times slower
JS> than COPY FROM.  Native bulk loading is always going to win, by a lot.

At this point I've spent a week optimizing speed with RDBO transactions
and COPY FROM, plus other attempts to improve performance, so I can't
try plain DBI as well.  COPY FROM will have to do for me.

Ted

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to