http://www.perlmonks.org?node_id=617260

porta has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Monks. I just wanted to ask if anyone knows which CGI::Session driver has the best performance (mostly between file and mysql). I know that there are lots of variables here, just looking for a simple quick answer.
Also, bonus question: Using the file driver, if I create a session from a web application A (having all CGI::Session settings to default), can I load that session from web application B if B knows the session id?. Thanks in advance.

Replies are listed 'Best First'.
Re: CGI::Session performance
by jdtoronto (Prior) on May 24, 2007 at 16:36 UTC
    I have used CGI::Session with both file and mysql, file is a little faster, but I prefer mysql for other reasons.

    Several applications can share the same database easily using mysql, I can't answer that for file. I often have several applications using the same data from several different servers using a common mysql server.

    jdtoronto

Re: CGI::Session performance
by shmem (Chancellor) on May 25, 2007 at 06:23 UTC
    Check out DBD::SQLite, which seems faster to me than mysql.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}