ZF-8243: Zend_Session Optimization
Description
Zend_Session_SaveHandler_DbTable execute two identical queries:
//execute this when read data
DESCRIBE session
SELECT session.* FROM session WHERE (((session.id = '595c162e5db9c8ba51e5518a3fdec828')))
//execute this when write data
SELECT session.* FROM session WHERE (((session.id = '595c162e5db9c8ba51e5518a3fdec828')))
UPDATE session SET modified = ?, data = ?, lifetime = ? WHERE (id = '595c162e5db9c8ba51e5518a3fdec828')
We can useing the data from the first select.
Comments
Posted by Yancho Georgiev (yancho) on 2009-11-06T05:10:52.000+0000
Solution...
Posted by Adam Lundrigan (adamlundrigan) on 2012-05-05T02:23:07.000+0000
This is a minor optimization at best, and would require substantial change to the class to maintain and reference an internal copy of the table record and ensure it is in sync with the database when it is referenced. Closing as won't fix as the cost outweighs the benefit.