wild card search on memcache

Skylos skylos at gmail.com
Thu Feb 17 16:18:54 PST 2005


it would be interesting, however, if you were to make a similar to
memcached implimentation whre instead of using hashes, used a btree
index, which is apparently great at finding data that can be found in
sort-related ways, like ranges and stuff.  anything greater than or
equal to 'abc' and less than 'abd' should be efficient to find.

But thats a whole new project.  memcached.btree, anybody?  :P

Skylos


On Thu, 17 Feb 2005 15:03:27 -0800, John McCaskey <johnm at klir.com> wrote:
> On Wed, 2005-02-02 at 18:20 +1100, Sherman Chan wrote:
> > Hi,
> > I just play around memcached with PHP, and it's great, but I wonder
> > does it supports wild card search, for example I would like to bring
> > back all result with the key start with ABC
> 
> Not presently supported.
> 
> >
> > is that possible to do that?
> 
> Of course it is theoretically possible to add this feature, but the
> issue is that it would be very slow.  A hash table is used internally to
> represent the keys.  Hash tables are great for lookup of an exact value,
> but very slow for search for values that match a wildcard type search
> (basically have to do a full table scan comparing each key).
> 
> >
> > Thanks in advance
> > Sherman
> >
> --
> John A. McCaskey
> Software Development Engineer
> Klir Technologies, Inc.
> johnm at klir.com
> 206.902.2027
>


More information about the memcached mailing list