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
Common options always specify the base data file to open :
6
36
-`--datadir` which indicates the **directory** path where `data.mdb` is located
7
37
-`--lmdb.mapSize` which indicates the **LMDB map size** of data.mdb
@@ -14,7 +44,7 @@ Omitting the specification of --lmdb.mapSize is allowed as long as the data file
14
44
**Warning** : although db_toolbox protects against errors is highly discouraged to provide a value for --lmdb.mapSize lower than actual file size cause, as observed behavior, the result is a truncation of data file to a size matching --lmdb.mapSize thus causing the invalidation of all mappings for existing data.
This command provides a handy way to empty a table from all records or drop it.
148
178
149
179
Example :
150
-
`./db_toolbox --datadir <parent-directory-to-data.mdb> clear --names h b`
180
+
`db_toolbox --datadir <parent-directory-to-data.mdb> clear --names h b`
151
181
152
182
will delete all records from tables `h` and `b` but the table (meant as a container) will remain into database.
153
183
154
184
Example :
155
-
`./db_toolbox --datadir <parent-directory-to-data.mdb> clear --names h b --drop`
185
+
`db_toolbox --datadir <parent-directory-to-data.mdb> clear --names h b --drop`
156
186
157
187
will delete tables `h` and `b` from database just like a SQL `drop` statement.
158
188
159
189
## Caveat
160
190
Like all operations on LMDB the deletion of records (or of an entire table) lives within a writable transaction and by consequence requires database file to have enough space available to record all data pages which will be freed by the transaction. This implies the size of database file may grow.
The purpose of this subcommand is to obtain a _compacted_ data file. The compaction process renumbers all data pages while reclaiming those previously freed by preceding transactions. This command is the implementation of `mdb_env_copy2` LMDB API call with `MDB_CP_COMPACT` flag.
166
196
Running this command reports no progress and, ad indicative figure, took more than 6 hours to compact an 730GB data file on Windows with NMVe storage support.
@@ -290,7 +320,7 @@ This tools gives the user the ability to copy individual table(s) from one datab
0 commit comments