Skip to content

CLI Commands

Run:

Terminal window
taidb --help
OptionPurpose
--syncForce synced writes.
--compression <mode>Select compression mode.
--zstd-level <level>Set zstd level for zstd mode.
--compression-min-bytes <bytes>Minimum value size before compression.
--key-file <path>Use an encryption key file.
--no-mmap-readsUse direct file reads instead of mmap.
--read-onlyOpen an existing database without write/create access.

Compression modes:

  • none
  • zstd-fast
  • zstd
  • zstd-dense
  • zstd-max
Terminal window
taidb put <path> <key> <value>
taidb get <path> <key>
taidb delete <path> <key>
taidb delete-prefix <path> <prefix>
Terminal window
taidb vector-put <path> <key> "0.1,0.9,0.2"
taidb vector-search <path> "0.0,1.0,0.2" --limit 5
Terminal window
taidb stats <path>
taidb stats <path> --json
taidb --read-only stats <path>
taidb verify <path>
taidb --read-only verify <path>
taidb compact <path>
taidb repack <path>
taidb snapshot <path> <output>
taidb snapshot <path> <output> --read-only
Terminal window
taidb keygen <output>
Terminal window
taidb import <path> <input> --format auto
taidb import <path> <input> --format jsonl
taidb import <path> <input> --format csv
taidb import <path> <input> --format dir
taidb import-db <target> <source>

Common import options:

Terminal window
--batch-size 4096
--prefix docs:
--source-key-file ./source.key
Terminal window
taidb bench-large <path>
taidb bench-enterprise <path>
taidb bench-compression <path>

bench-compression creates separate output files for no compression, zstd-fast, and zstd-dense, then reports write speed, read speed, verify speed, file size, compression ratio, and space savings.

Use benchmark output as a comparison artifact. Include hardware and settings when publishing results.