Re: [PHP] SESSIONS vs. MySQL



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

.



Relevant Pages

  • Re: Combining tables from two copies of DB
    ... I agree that the challenge with the other database is the junction table. ... linked to the Sessions table through a foreign key field. ... the employee names. ... >> in many training sessions, and each training session may be attended by ...
    (microsoft.public.access.queries)
  • Re: Orphan sessions
    ... server mode) in the database. ... to manually identify these sessions and kill them off ourselves. ... connection pooling and connecting in dedicated server mode. ... The transaction should begin when the luser ...
    (comp.databases.oracle.server)
  • Re: Orphan sessions
    ... server mode) in the database. ... to manually identify these sessions and kill them off ourselves. ... connection pooling and connecting in dedicated server mode. ... The transaction should begin when the luser ...
    (comp.databases.oracle.server)
  • Re: how data from database passed to the session in a loop?
    ... all data is filled in using sessions. ... the data will be populated from the database. ... I wonder if there is a quicker way to do it, like using a loop. ... Jerry Stuckle ...
    (comp.lang.php)
  • RE: How to biuld a coursescheduling database
    ... the immediate problem at hand without thinking ahead about how your database ... You are now left with the problem of where to put the teacher data and the ... other attributes of the course sessions. ... >> Your report would run off of the Sessions table sorted by date and time. ...
    (microsoft.public.access.tablesdbdesign)