-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
I have few questions about performance.
Why do you use REPLACE INTO instead of INSERT ON DUPLICATE KEY UPDATE. When you're only creating new sessions this maybe makes sense. But most of the time you're gonna update sessions. For a small amount of sessions the difference is barely seen, but for a anything bigger this would stress the database for no reason with deleting the record before inserting when you only want to update the column/columns.
Second questions is why do you delete older sessions in open method instead of relying on php session garbage collect? Your solution forces a delete in every user interaction for every user. GC would reduce the amount queries and the more users application has the bigger the advantage of gc would be.
Metadata
Metadata
Assignees
Labels
No labels