Thanks, that looks good. But what do I do if OS is WinDoze? The install of the pecl only gives a .so *feeling sorry not everything runs on xp* ... I will take the time to benchmark the serializing vs db calls ... is there a good benchmark tool out there (without having to use microtime inside the scripts)? Thanks T -----Original Message----- From: Jasper Bryant-Greene [mailto:jasper@xxxxxxxxxxxxxxxxxx] Sent: 28 September 2005 11:41 AM To: php-general@xxxxxxxxxxxxx Subject: Re: serializing result sets or what? 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php