Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about lmdb shuffle #5

Closed
mdqyy116 opened this issue Mar 3, 2016 · 1 comment
Closed

question about lmdb shuffle #5

mdqyy116 opened this issue Mar 3, 2016 · 1 comment

Comments

@mdqyy116
Copy link

mdqyy116 commented Mar 3, 2016

Nice job. I have two quesions about shuffling the data stored in lmdb/leveldb.

  1. The data reading performance whether will affect by shuffling.
  2. Does this shuffling manner support with leveldb.

Thanks.

@lim0606
Copy link
Owner

lim0606 commented Mar 7, 2016

@mdqyy116

  1. The data reading performance whether will affect by shuffling.

Yes, it affects somewhat. Since lmdb ordered-key value, it only allows us to read the entries sequentially. That is why I randomly skips some entries as shuffle. (I'm not have a good background on database). If the number of skips are two much, meaning it takes longer time than the network propagation, the other network layers can wait until the fetch is done.

  1. Does this shuffling manner support with leveldb.

As you can see here (https://en.wikipedia.org/wiki/NoSQL), LevelDB support random access. So, you can simply shuffle keys and use those keys to access any entry. However, because of the random access property, it only allow us to use one process for reading each database.

@lim0606 lim0606 closed this as completed Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants