Thomas wrote:
Q: What would be the best way to save db calls for large result sets?
I thought about serializing the data and then caching it (with Cache_Lite -
maybe there will be a future inclusion of such a caching scheme into the php
core or pecl?). I was not sure about performance though (no time for
benchmarking this).
The issue is that as this system grows we get 2 - 3 db calls on the server
(which is too much in my opinion), but will serializing be cheaper or simply
the lesser of two evils?
A very similar question was asked recently on this list. You might like
to consider caching whatever you create from those result sets rather
than the result sets themselves, but APC [1] is worth looking at as I
believe it can cache (some?) PHP vars without serialisation, using
apc_store() and apc_fetch().
The only way to know whether such a scheme would help in your specific
situation is to benchmark. Go on, it won't take long!
[1] http://php.net/apc
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php