Altering queries?
K J
sanbat at gmail.com
Fri Sep 21 08:14:21 UTC 2007
>
> There is one thing computers do really well, and that is iterating thru
> lists.
> I would suggest that getting the list from memcache and then processing it
> is not going to be any slower than getting a list of results from a heavy
> database query... and... iterating through that. Especially if you use the
> get_multi instead of thousands of individual gets (but that take a little
> extra programming to detect an element that wasn't in the cache, but you
> might get better over-all response times)
>
> Of course, its always a useful thing to then store in memcache your
> PROCESSED data. So after you've iterated through your list and formatted or
> ordered the data in some format that is useful for you, cache it. Then next
> time, use the cached version and you don't have to iterate it again. If
> your data changes frequently, figure out the delta and use it as your expiry
> time.
The problem here is, Memcache arrays don't have indexes where searches for a
particular ID or range is fast, as opposed to a DB server. Or is there a
way around this too?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070921/6cfe946c/attachment.htm
More information about the memcached
mailing list