Is this insane?

Marcus Bointon marcus at synchromedia.co.uk
Mon Dec 4 00:42:49 UTC 2006


On 3 Dec 2006, at 22:30, Fi Dot wrote:

> Mmm.. maybe im missing the point here, but wouldn't it be better to do
> all the lookups, construct one big query for all the data that's
> missing, and get it all at once? Then you will have 1 DB query at
> most.

Well, yes, but that could be quite a big, expensive query - how many  
memcache lookups could you do in the same time? Having gone to the  
expense of getting it, it makes sense to put all the resulting rows  
into memcache. The only problem is that if you do this enough, you  
end up doing more writes than reads. If you did a query just for the  
IDs, how much of a saving would that be over getting everything, and  
how many memcache queries would you be able to do in the difference?

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
marcus at synchromedia.co.uk | http://www.synchromedia.co.uk/




More information about the memcached mailing list