Re: SESSIONS vs. MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Philip Thompson wrote:

> Ok, so I've implemented this in several places where information
> basically does not change from page to page. Jumping to the point/
> question... when does it become more inefficient to store lots of
> information in SESSION variables than to run several more queries?
> Note, we are actually storing sessions in the database - so a read/
> write is required on each page load - it's not file sessions.

I don't think you're likely to see any measurable difference, not until
your sessions get VERY big (I'm guessing megabytes).  There's is
overhead associated with both forms - the SESSION data must be
serialized/de-serialized, the mysql calls organises data to/from an
associative array etc., but what is hauled out of the database is
essentially the same, it's only the transmission method that differs.


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux