experimental_cagra_index¶
The
experimental_cagra_indexsystem variable controls whether the CAGRA (Cuda ANN Graph) vector index plugin is enabled. When set to0(default),CREATE INDEX ... USING cagrastatements are rejected. Set it to1before creating or rebuilding a CAGRA index. CAGRA is a GPU-accelerated graph-based ANN algorithm and requires GPU hardware for index construction. This is an experimental feature gated by a session-level flag.
The experimental_cagra_index system variable gates access to the CAGRA vector index algorithm
in MatrixOne. CAGRA is a GPU-accelerated graph-based algorithm for approximate nearest neighbor
search, providing high recall and performance at scale. Index construction requires a GPU.
Because this is an experimental feature, the variable defaults to 0 and must be explicitly
enabled before use.
Syntax¶
SET GLOBAL experimental_cagra_index = 0; SET SESSION experimental_cagra_index = 1;
Query the current value:
SHOW VARIABLES LIKE ‘experimental_cagra_index’; SELECT @@experimental_cagra_index; SELECT @@global.experimental_cagra_index;
Arguments¶
Property |
Value |
|---|---|
Variable Type |
|
Scope |
|
Dynamic |
|
Default Value |
|
Optional Value |
|
Examples¶
DROP DATABASE IF EXISTS cagra_demo;
CREATE DATABASE cagra_demo;
USE cagra_demo;
SET experimental_cagra_index = 1;
SELECT @@experimental_cagra_index;
SELECT @@global.experimental_cagra_index;
SET experimental_cagra_index = 0;
DROP DATABASE cagra_demo;
Constraints¶
experimental_cagra_indexdefaults to0. AttemptingCREATE INDEX ... USING cagrawhile the variable is0causes the operation to fail.CAGRA requires GPU hardware for index construction. It will not function on CPU-only builds of MatrixOne.
This is an experimental feature. Its behavior, performance characteristics, and API may change in future releases.