Skip to content

Commit 9c2856b

Browse files
committed
Read me additions
1 parent b09956f commit 9c2856b

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,24 @@
22

33
Official Python binding for TidesDB
44

5+
### Install
6+
7+
Installing latest version from source using pip.
8+
9+
```py
10+
pip install git+https://github.com/tidesdb/tidesdb-python.git
11+
12+
```
13+
514
### Usage
615

16+
#### Getting current TidesDB module version
17+
18+
```python
19+
import tidesdb
20+
print(tidesdb.__version__)
21+
```
22+
723
#### Basic operations
824

925
```py
@@ -18,7 +34,7 @@ db.create_column_family(
1834
1024*1024*64, # Flush threshold (64MB)
1935
12, # Max level skip list, if using hash table is irrelevant
2036
0.24, # Probability skip list, if using hash table is irrelevant
21-
True, # Enable compression
37+
True, # Enable compression, is slower
2238
TidesDBCompressionAlgo.COMPRESS_SNAPPY, # Compression algorithm can be NO_COMPRESSION, COMPRESS_SNAPPY, COMPRESS_LZ4, COMPRESS_ZSTD
2339
True, # Enable bloom filter
2440
TidesDBMemtableDS.SKIP_LIST # Use skip list for memtable
@@ -173,3 +189,12 @@ db.drop_column_family("my_column_family")
173189
db.close()
174190

175191
```
192+
193+
#### Compacting Column Family SSTables
194+
Compaction will cut the amount of SSTables for a column family in half by pairing, merging and removing expired and tombstoned keys for the specified column family, with a specified number of threads.
195+
196+
```python
197+
db.compact_sstables("my_column_family", max_threads=4) # max threads is refering to amount of threads used for compaction process
198+
# 4 threads means 2 sstables being paired per thread which is faster than a lone thread say.
199+
```
200+

0 commit comments

Comments
 (0)