Re: [PHP] SESSIONS vs. MySQL
- From: per@xxxxxxxxxxxx (Per Jessen)
- Date: Mon, 22 Sep 2008 09:00:47 +0200
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
.
- References:
- SESSIONS vs. MySQL
- From: Philip Thompson
- SESSIONS vs. MySQL
- Prev by Date: Re: [PHP] SESSIONS vs. MySQL
- Next by Date: Re: [PHP] SESSIONS vs. MySQL
- Previous by thread: Re: [PHP] SESSIONS vs. MySQL
- Next by thread: Re: [PHP] Passing variables between pages
- Index(es):
Relevant Pages
|