First question after trying hive

Hi,

I have just tried a few queries with Hive, and have a first question.

Is there a way to retrieve all key/pair values within a hive ? I did not find a way to do so in one shot, and since I haven’t found any documentation I figured I’d ask.

This is what I ended up doing and it worked.

However, it requires two calls and going through a bit of processing to get the keys property in between. In the end, the total time is in fact way longer than getting the same amount of data stored in a data table, which I can do in a single call.

Perhaps I have missed something ?

And just to clarify, I was sort of trying it out for the few initial parameters (20 or so) in my app in order to reduce loading time by getting them faster.

Hi @Nicolas_REMY,

we have documentation for JS and REST at the moment:
https://backendless.com/docs/rest/hive_overview.html
https://backendless.com/docs/js/hive_overview.html

Others are in progress.

Is there a way to retrieve all key/pair values within a hive ? I did not find a way to do so in one shot

Unfortunately, no. This is how Redis works. You need to use cursor in order to find all records (until it return 0).

As of performance, we’ll take a look into it. It’s strange, because Hive should (and have to) work much faster that any DB.

Regards,
Stanislaw

Also would like to add that the max pageSize for Hive is 5000

Regarding performance : the result I got was because on the whole, I needed to :

  • get the names of all the key names (first network call to the server)
  • get the property value for keys (processing on the client)
  • get the values for all key names thus provided (second network call to the server)

The low performance was for the whole process, and likely due to the fact there had to be two network calls to the server.

I compared this with getting all key pairs from a DB table, which is slower because it’s from DB, but faster because there had to be only a single network call.

I believe that the answer to why it is sometimes slower is how we use it. For some reason, we are comparing these two different technologies.

Hive is commonly used when you need frequent, fast and minor changes to small pieces of information. And most problems arise when you try to use it as well as the relational DB.

1 Like