Skip to main content
Create a StreamingDiskANN index on a vector column for high-performance similarity search with optional label-based filtering.
  • Create indexes for fast approximate nearest neighbor search
  • Configure index build-time parameters for optimal performance
  • Enable label-based filtering for precise vector search
  • Choose storage layouts for memory optimization or plain storage
Note that:
  • The index build process can be memory-intensive. Consider increasing maintenance_work_mem:
  • Label values must be within smallint range (-32768 to 32767)
  • Creating indexes on UNLOGGED tables is not currently supported
  • Null vectors are not indexed; null labels are treated as empty arrays

Samples

Basic index creation

With custom parameters

With label-based filtering

With storage layout

Syntax

Distance operators

Build-time parameters

For detailed information about each parameter and tuning recommendations, see Index build-time parameters. To configure query behavior at runtime, see Query-time parameters.