Memcached implementation inquiry

Marcus Bointon marcus at
Thu Apr 19 17:18:44 UTC 2007

On 19 Apr 2007, at 18:04, Michael Firsikov wrote:

> That is a solution, however, I can have potential searches that  
> yield very
> large resultset of matching IDs (excess of 1 million) and since  
> memcached
> can store only up to 1MB per key, I can not store 1 million 6 digit  
> IDs in
> one element and would have to fragment it further. (not that big of a
> problem)

Sounds like you could do with bigger stored values, but... If a MySQL  
search on a table of 1.4 million rows for an exact match on one  
indexed field is slower than manually looping through the same number  
of individual results from memcached and running PHP functions on  
every one of them, something is seriously wrong with your DB. You  
should fully expect MySQL to be several orders of magnitude faster  
than PHP for searches like this. If you can arrange for your data to  
be in a format that you can search this way in memcache, then you can  
arrange the same inside MySQL, where it will be many times faster.  
Can you give more detail on exactly what your searches look like?

Marcus Bointon
Synchromedia Limited: Creators of
UK resellers of info at hand CRM solutions
marcus at |

More information about the memcached mailing list