store SQL query in Session for further processing

2

I would like to store a SQL query in a session, that is, all fields and their values.

I'd say there are 12 fields, and about 150 records on average.

The idea is not to query the database every time you need it, but only once and the others only work on the information that has already been registered in the session.

This could be bad somehow, this would require the server in what sense, disk space? CxB is it worth it ?, Would this make the answers faster (since I no longer consult the DB in this way)?

    
asked by anonymous 31.10.2015 / 21:57

1 answer

1

Briefly, yes. It would make your application faster since it would not query the database, but it is important to keep in mind the reliability of the data. You need to create ways to ensure that session data is the same as that found in the database.

It would be interesting to evaluate caching systems such as redis or memcached in your case. I think this would already make your app faster and more robust.

    
31.10.2015 / 22:07