This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

Vector System Variables

MariaDB starting with 11.7.1

Vectors were introduced in MariaDB 11.7.1

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_max_cache_size

  • Description: Upper limit for one MHNSW vector index cache.
  • Commandline: --mhnsw-max-cache-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: bigint unsigned
  • Default Value: 16777216
  • Range: 1048576 to 18446744073709551615
  • Introduced: MariaDB 11.7.1

mhnsw_default_distance

  • Description: default value for the DISTANCE vector index option.
  • Commandline: --mhnsw-default-distance=val
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: enum
  • Default Value: euclidean
  • Valid Values: euclidean, cosine
  • Introduced: MariaDB 11.7.1

mhnsw_default_m

  • Description: default value for the M vector index option.
  • Commandline: --mhnsw-default-m=#
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: int unsigned
  • Default Value: 6
  • Range: 3 to 200
  • Introduced: MariaDB 11.7.1

  • Description: Defines the minimal number of result candidates to look for in the vector index for ORDER BY ... LIMIT N queries. The search will never search for less rows than that, even if LIMIT is smaller. This notably improves the search quality at low LIMIT values, at the expense of search time
  • Commandline: --mhnsw-ef-search=#
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: int unsigned
  • Default Value: 20
  • Range: 1 to 10000
  • Introduced: MariaDB 11.7.1

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.