Hacker News new | ask | show | jobs
by antirez 5296 days ago
no need to sort by a non existing key, all you need is that the BY pattern does not contain an asterisk, so it is constant, that means all the elements have the same value for sorting, and Redis knows that it can skip it and use the List natural ordering.

It is interesting that you can ask for single elements of an hash, like in: GET object:*->field

With 2.6 and scripting this kind of optimizations will become the rule.

2 comments

Ah no asterisk means nothing to replace, makes sense.

Excited for 2.6 and scripting. Has much changed on the scripting side since the 2.2-scripting branch?

Good point, but surely using a key like nosort makes the intent clearer.