Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One complaint: Don't actually use the KEYS command. It's not very efficient. Instead, keep a set of all the keys you would want to delete. When you call KEYS, it has to do a linear scan of every key in the database, and since it is stored as a hash table there really isn't a way to optimize it. It's useful for inspecting things in redis-cli, but not much else.


KEYS is indeed only a debugging command, as clearly stated in the documentation.


Probably it should be named DBG_KEYS or D_KEYS - some evil hard to type name, that says - I'm to be used very rarely.

But what do I know, just giving friendly advice...


thanks, I added a note.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: