Skip to content

Operations

AkasicDB exposes vector edition, index limits, index processing, and index state through SQL interfaces.

  • vectoron_edition(): query the AkasicDB vector edition
  • vectoron_max_indexes(): query the vector index count limit
  • vectoron_max_vectors_per_index(): query the per-index vector count limit
  • fence_vector_index(...): wait for index-related background work to complete
  • vectoron_index_stat: query vector index state from SQL
  • alter_vector_index(...): update supported runtime index options

Check Edition and Limits

Use these functions to check the vector edition and index limits for the current AkasicDB environment.

SELECT
  vectoron_edition() AS edition,
  vectoron_max_indexes() AS max_indexes,
  vectoron_max_vectors_per_index() AS max_vectors_per_index;
Function Return value
vectoron_edition() AkasicDB vector edition
vectoron_max_indexes() Maximum number of vector indexes (NULL: no limit set)
vectoron_max_vectors_per_index() Maximum vectors per vector index (NULL: no limit set)

Wait for Index Processing

fence_vector_index blocks until current work for the specified vector index has completed. Use it after index creation, before a status check, or before a measurement query.

Note

Vamana examples use vector_l2_ops and <->.

CREATE INDEX items_embedding_vamana_idx
  ON items
  USING vectoron (embedding vector_l2_ops)
  WITH (options = $$
    [indexing.vamana]
    alpha = 1.2
    r = 32
    l_search = 64
    phase = 1
  $$);

SELECT fence_vector_index('items_embedding_vamana_idx'::regclass);

fence_vector_index is not a tuning option. Use it when a status check or measurement query must run after index work has completed.

Inspect Index State

vectoron_index_stat reports AkasicDB vector index state.

SELECT
  tablename,
  indexname,
  idx_status,
  idx_indexing,
  idx_tuples,
  idx_size
FROM vectoron_index_stat
WHERE indexname = 'items_embedding_vamana_idx';
Column Type Description
tablerelid oid Table OID
indexrelid oid Index OID
tablename name Table name
indexname name Index name
idx_status text Index status
idx_indexing bool Whether index work is still running
idx_tuples int8 Total indexed vector count across segments
idx_sealed int8[] Vector counts for sealed segments
idx_growing int8[] Vector counts for growing segments
idx_write int8 Vector count in the write buffer
idx_size int8 Total segment size in bytes
idx_options text Serialized index options

Track Segment State

Segment fields show where indexed vectors are located while background work proceeds.

SELECT
  indexname,
  idx_indexing,
  idx_sealed,
  idx_growing,
  idx_write
FROM vectoron_index_stat
WHERE indexname = 'items_embedding_vamana_idx';

Use idx_indexing as the coarse completion flag. Use idx_sealed, idx_growing, and idx_write to inspect segment distribution.

Change Optimization Worker Count

alter_vector_index changes the background optimization worker count for an existing vector index. Higher values allow more segment merge and optimization work to run in parallel, and may increase CPU use. This change does not require rebuilding the index.

SELECT alter_vector_index(
  'items_embedding_vamana_idx'::regclass,
  'optimizing.optimizing_threads',
  '8'
);