in reply to Re^2: SQLite in memory database to scalar
in thread SQLite in memory database to scalar

Well, aside from extending DBD::SQLite, how about writing the file to an in-memory filesystem, and using something like IO::Compress::Gzip to compress as you output the file instead of calling an external tool (as it sounds like you're doing now)?

Also, in terms of speed, benchmarks speak much louder than words ;-)

Replies are listed 'Best First'.
Re^4: SQLite in memory database to scalar
by Rodster001 (Pilgrim) on Mar 19, 2014 at 22:47 UTC
    That is what I am trying to do.

    Can you provide an example of how that could be done (in-memory filesystem)? I tried to pass it a filehandle (which didn't work), then I looked at the code and that sqlite_backup_to_file is part of the sqlite c api. It takes a filename as an argument, opens it, writes to it, and closes it.

    True enough about benchmarks :) but I do know that file operations are slower than in-memory ones.

      What OS is your server? On Linux and a few others, there's tmpfs, try mount | grep tmpfs to see if you've got any mounted and where. Otherwise, List of RAM drive software