Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: DBI::SQLite slowness

by sam_bakki (Pilgrim)
on Sep 22, 2013 at 06:18 UTC ( #1055168=note: print w/replies, xml ) Need Help??

in reply to DBI::SQLite slowness


If you still like to use SQlite, Try this

$dbHandle->do("PRAGMA journal_mode = WAL");

Thanks & Regards,
Bakkiaraj M
My Perl Gtk2 technology demo project - , contributions are welcome.

Replies are listed 'Best First'.
Re^2: DBI::SQLite slowness
by erix (Parson) on Sep 22, 2013 at 06:42 UTC


    It looks from that page that DELETE is the default ("The DELETE journaling mode is the normal behavior.").

    Using WAL (Write Ahead Log) is another writing step (slow), so wouldn't it make more sense to switch journaling off:

    $dbHandle->do("PRAGMA journal_mode = OFF");

    That would make the transaction(s) less reliable in case of a crash, but in this particular case that seems unimportant (initial data load, ephemeral data). I would expect journal_mode = OFF to be faster than either the default DELETE, or writing WAL.

    (Then again, I don't use SQLite so I may be completely wrong. If anyone does the tests, I'd be interested to see the speed differences.)

Re^2: DBI::SQLite slowness
by Endless (Beadle) on Sep 23, 2013 at 17:59 UTC
    Thanks for the suggestions. I've tried it with both WAL and OFF without a change in the results on my test-dataset of 83,000 entries. I'll keep it in mind when I try on my real datasets too, though.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055168]
[erix]: that's a good one. I must remember that :P
[stevieb]: I really dislike how perlbrew doesn't list your version of perl if a newer minor version bump has happened. eg: I use 5.24.1, but 5.24.2 is available, hiding my 5.24.1. I may look at this, as I made it display correctly in berrybrew in cases like this
[stevieb]: choroba just gleaned your post about Module::Starter. I use it too, pretty much for every dist I write

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2017-08-18 20:46 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (310 votes). Check out past polls.