pub enum ColumnStorageMode {
Default,
Dictionary,
ContentAddressed,
Columnar,
}Expand description
Column storage mode for per-column storage optimization
Allows fine-grained control over how individual columns are stored, enabling different compression and deduplication strategies based on the column’s data characteristics.
§Storage Modes
Default: Standard row-oriented storage, inline in tupleDictionary: Dictionary-encoded strings for low-cardinality columnsContentAddressed: Hash-based deduplication for large valuesColumnar: Column-grouped storage for analytics workloads
§Example
CREATE TABLE users (
id INT PRIMARY KEY,
status TEXT STORAGE DICTIONARY, -- Low cardinality
bio TEXT STORAGE CONTENT_ADDRESSED, -- Large text
scores FLOAT8[] STORAGE COLUMNAR -- Analytics
);Variants§
Default
Standard row-oriented storage (default) Best for: OLTP, point queries, mixed workloads
Dictionary
Dictionary-encoded storage for low-cardinality strings Best for: Enum-like values, status codes, country codes (<64K unique values)
ContentAddressed
Content-addressed storage with hash-based deduplication Best for: Large values (>1KB) with duplicates (documents, blobs)
Columnar
Column-grouped storage for analytics Best for: Analytics, aggregations, range scans, time-series data
Trait Implementations§
Source§impl Clone for ColumnStorageMode
impl Clone for ColumnStorageMode
Source§fn clone(&self) -> ColumnStorageMode
fn clone(&self) -> ColumnStorageMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnStorageMode
impl Debug for ColumnStorageMode
Source§impl Default for ColumnStorageMode
impl Default for ColumnStorageMode
Source§fn default() -> ColumnStorageMode
fn default() -> ColumnStorageMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ColumnStorageMode
impl<'de> Deserialize<'de> for ColumnStorageMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ColumnStorageMode
impl Display for ColumnStorageMode
Source§impl PartialEq for ColumnStorageMode
impl PartialEq for ColumnStorageMode
Source§impl Serialize for ColumnStorageMode
impl Serialize for ColumnStorageMode
impl Copy for ColumnStorageMode
impl Eq for ColumnStorageMode
impl StructuralPartialEq for ColumnStorageMode
Auto Trait Implementations§
impl Freeze for ColumnStorageMode
impl RefUnwindSafe for ColumnStorageMode
impl Send for ColumnStorageMode
impl Sync for ColumnStorageMode
impl Unpin for ColumnStorageMode
impl UnsafeUnpin for ColumnStorageMode
impl UnwindSafe for ColumnStorageMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.