RANGES argument for ZINTERSTORE #452

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
4 participants
@dmelikyan

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:

ZINTERSTORE out 2 zset1 zset2 RANGES 1 10 5 25

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.

@joshrtay

This comment has been minimized.

Show comment Hide comment
@joshrtay

joshrtay Apr 24, 2012

+1. I was just looking for that functionality.

+1. I was just looking for that functionality.

@automatthew

This comment has been minimized.

Show comment Hide comment
@automatthew

automatthew May 7, 2012

+1

+1

@jamesjin

This comment has been minimized.

Show comment Hide comment
@jamesjin

jamesjin May 7, 2013

+1
This is really useful.

jamesjin commented May 7, 2013

+1
This is really useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment