You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GETTING_STARTED.md
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Or add it to your rebar config
16
16
```erlang
17
17
{deps, [
18
18
....
19
-
{rocksdb, "2.0.0"}
19
+
{rocksdb, "2.2.0"}
20
20
]}.
21
21
```
22
22
@@ -68,6 +68,41 @@ end,
68
68
rocksdb:delete(Db, <<"my key">>).
69
69
```
70
70
71
+
### Batch Reads with multi_get
72
+
73
+
When you need to retrieve multiple keys at once, `multi_get/3` is more efficient than calling `get/3` multiple times. It retrieves all keys in a single operation:
Note that if the process dies after the Put of key2 but before the delete of key1, the same value may be left stored under multiple keys. Such problems can be avoided by using the function `rocksdb:write/3` class to atomically apply a set of updates:
0 commit comments