5

While searching for easy and effective tools to improve performance of Data fetching for our application, we bumped into "Redis".

In documentation of redis, there is following specific mention of these two types or categories of queries:

It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries...

This was first time in area of database and data structures, I have read such thing. I dug out internet to know more, but found nothing useful.

What exactly are Range and Radius queries? What is the difference between the two? Any explanation with example will be useful.

5

Range stands for one-dimensional distance while radius is standing for two-dimensional one.

Let's the data is the timestamp. It is one-dimensional and you can define part of data "in range" or timestamp BETWEEN a AND b. If your data represents the plane of points x:y then you can define part of them as "points closer than radius Z to the given point" or (x-x1)^2 + (y-y1)^2 < Z^2.

  • 1
    is Radius for GEO locations only? – Ivanov Jul 30 '17 at 5:51
  • 1
    If you can represent your type/class as cartesian plane then you can use radius for your purposes. – Kondybas Jul 30 '17 at 12:49
  • Oh okay, this means there must be some terminology for three dimensional space? – Karan Desai Aug 1 '17 at 4:14
  • 1
    Both circle and sphere has radius that equals to the root of sum of squares of projections. So terminology is exactly the same. – Kondybas Aug 1 '17 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.