pub enum IndexMethod {
BTree,
Hnsw,
Brin,
Gin,
}Variants§
BTree
Default — B-tree over IndexKey. Used for equality / range
lookups on scalar columns.
Hnsw
USING hnsw — NSW graph for kNN over a vector column.
Brin
v6.7.1 — USING brin — Block Range INdex. Per-segment
metadata that records (min_key, max_key) for each page in a
cold-tier segment, on the indexed column. The optimizer
can use these summaries to skip pages whose range does NOT
overlap a query’s WHERE predicate. BRIN indexes carry no
in-memory data — the summaries live in the segment v2
envelope’s sidecar. Created via the standard
CREATE INDEX … USING brin (col) syntax.
Gin
v7.12.3 — USING gin — inverted index over a tsvector
column. Posting lists map lexeme word → row locators; the
planner uses them to narrow WHERE col @@ tsquery to the
candidate rows whose vectors contain a matching term, then
re-evaluates the full @@ semantics on each candidate.
Replaces the v7.9.26b USING gin → BTree fallback that
silently degraded to a full scan at query time.
Trait Implementations§
Source§impl Clone for IndexMethod
impl Clone for IndexMethod
Source§fn clone(&self) -> IndexMethod
fn clone(&self) -> IndexMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IndexMethod
Source§impl Debug for IndexMethod
impl Debug for IndexMethod
impl Eq for IndexMethod
Source§impl PartialEq for IndexMethod
impl PartialEq for IndexMethod
Source§fn eq(&self, other: &IndexMethod) -> bool
fn eq(&self, other: &IndexMethod) -> bool
self and other values to be equal, and is used by ==.