Details
-
Improvement
-
Resolution: Obsolete
-
Medium
-
None
-
4.1.4, 4.2.0, 4.3.0, 4.4.0alpha4
-
None
Description
Current code to store session data in the db selects first current session, then decides to either update or insert.
This is
. not atomic
. not very efficient
Since we hope that a session is used more than once (avg. pages viewed per user on a site might be 5), it makes sense to do the reverse:
. update first
. look at number of rows updated
. if zero, do insert