Skip to content

Docs: change a database-scope engine setting with ALTER DATABASE - #113

Merged
tae898 merged 1 commit into
mainfrom
docs/112-database-settings
Oct 28, 2026
Merged

tae898 merged 1 commit into
mainfrom
docs/112-database-settings

Conversation

@tae898

@tae898 tae898 commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Closes #112

Every SCOPE.DATABASE engine setting, including all of arcadedb.vectorIndex.*, is set on one database with SQL that db.command already runs, so the bindings need no wrapper (DSL first). The docs never said so, and the create_vector_index docstring (#111) pointed at rebuildGraphRatio without saying how to change it.

  • how-to/databases-and-queries.adoc: a short "Database settings" section: the ALTER DATABASE statement (key backquoted), that it applies to that database only, that a SCOPE.SERVER setting is refused there (the engine names SET SERVER SETTING), and how to read a vector setting back through get_stats()["effectiveMutationsThreshold"].

  • create_vector_index docstring: the statement next to rebuildGraphRatio.

  • tests/test_vector_index_introspection.py: on a 1,000-vector index the threshold is 200, then 500 after ALTER DATABASE \arcadedb.vectorIndex.rebuildGraphRatio` 0.5`, on both wheels.

Checked beforehand against engine main c3af6d9028 (JDK 25): 1,000 to 250 at 5,000 vectors with the ratio at 0.05. Locally: black 26.10.1, isort 9.0.2, bandit, compile, pyflakes. The test runs in CI.

🤖 Generated with Claude Code

Every SCOPE.DATABASE setting (all of arcadedb.vectorIndex.*) is set on one database with SQL,
which db.command already runs, so the bindings need no wrapper (DSL first). Checked on engine
main c3af6d9028: effectiveMutationsThreshold at 5000 vectors goes 1000 -> 250 after
ALTER DATABASE `arcadedb.vectorIndex.rebuildGraphRatio` 0.05, and a SCOPE.SERVER setting is
refused with a message naming SET SERVER SETTING. databases-and-queries.adoc gets a short
section, the create_vector_index docstring the statement, and a test pins it on both wheels
(1000 vectors: threshold 200, then 500 with the ratio at 0.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 4a26257 into main Oct 28, 2026
36 checks passed
@tae898
tae898 deleted the docs/112-database-settings branch October 28, 2026 15:27
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

Successfully merging this pull request may close these issues.

Docs: how to change a database-scope engine setting (e.g. the vector rebuild ratio) from Python

1 participant