Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
RANGES argument for ZINTERSTORE #452
Coded simple enhancement to ZINTERSTORE. Main idea behind this is to intersect large zsets faster and using less memory by avoiding intermediate operations. It also makes some new query based data models possible (without scripting). Here is what it looks like:
It will do interstore on subsets of zset1 with scores between 1 to 10 and zset2 with scores between 5 and 25. Score ranges are specified the same way as in other commands using numbers, infinities and exclusion.
The worst case time complexity does not change.