Vector System Variables

MariaDB starting with 11.6

Vectors were introduced in MariaDB 11.6 Vector Preview.

This page documents system variables related to Vectors.

See Server System Variables for a complete list of system variables and instructions on setting them.

Also see the Full list of MariaDB options, system and status variables.

mhnsw_cache_size

  • Description: Size of the cache for the MHNSW vector index.
  • Commandline: --mhnsw-cache-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: bigint unsigned
  • Default Value: 16777216
  • Range: 1048576 to 18446744073709551615
  • Introduced: MariaDB 11.6.0

mhnsw_limit_multiplier

  • Description: Defines the number of result candidates to look for in the vector index for ORDER BY ... LIMIT N queries. Specified in term of LIMIT (1 means look for exactly N candidates, 2 means look for 2*N, etc). Larger values means the search will be slower, but the result will be closer to perfect. If there is no LIMIT clause, the index isn't used. Can be set per SELECT query based on the desired accuracy of the required results.
  • Commandline: --mhnsw-limit-multiplier=#
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: double
  • Default Value: 2.000000
  • Range: 1 to 100
  • Introduced: MariaDB 11.6.0

mhnsw_max_edges_per_node

  • Description: Larger values means slower INSERT, larger index size and higher memory consumption, but better search results. Not used for SELECT. The value should not be changed once vector indexes have been created. We recommend 5 to 8. Anything more and the insert performance drops significantly.
  • Commandline: --mhnsw-max-edges-per-node=#
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: int unsigned
  • Default Value: 5
  • Range: 2 to 200
  • Introduced: MariaDB 11.6.0

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.