Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: std dev calculations slow over time

by punkish (Priest)
on Oct 22, 2006 at 19:02 UTC ( [id://579889]=note: print w/replies, xml ) Need Help??


in reply to Re: std dev calculations slow over time
in thread std dev calculations slow over time

brian d foy doth spake

>I see you have some commit calls in there, but
>I didn't see where you set up a transaction.

my $dbh = DBI->connect( "dbi:SQLite:$dsn", '','', { RaiseError => 1, AutoCommit => 0 } ) or die "$DBI::errstr\n";

I also used Devel::Profiler to do some investigating, but dprofpp tmon.out kept on croaking on me with

>dprofpp tmon.out Modification of non-creatable array value attempted, subscript -1 at C +:\Perl\bin/dprofpp.bat line 717, <fh> line 1250.

so I gave up that route because I really didn't know wtf that was all about.

--

when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re^3: std dev calculations slow over time
by AK108 (Friar) on Oct 22, 2006 at 21:25 UTC
    Transactions (in any database support by DBI) are handled with the $dbh->begin_work and $dbh->commit methods. See the "transactions" section of DBI.pm.
Re^3: std dev calculations slow over time
by randyk (Parson) on Oct 22, 2006 at 23:09 UTC
    my $dbh = DBI->connect( "dbi:SQLite:$dsn", '','',
    { RaiseError => 1, AutoCommit => 0 } )
    or die "$DBI::errstr\n";
    I found with Win32 ActivePerl that explicitly setting $dbh->{AutoCommit} = 0; here helps.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://579889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-18 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found