pub struct MaintenanceOptions {
pub run_optimize: bool,
pub incremental_vacuum_pages: u32,
pub freelist_threshold_pages: u32,
pub wal_checkpoint: bool,
}Expand description
Which steps a maintenance pass performs and the thresholds that gate them. Default is the
server’s tuning: optimize on, reclaim up to 1000 freelist pages once ≥1000 have built up
(~4 MiB at a 4 KiB page), passive checkpoint on.
Fields§
§run_optimize: boolRun PRAGMA optimize to refresh stale planner statistics.
incremental_vacuum_pages: u32Max freelist pages to return to the OS per pass (the N in incremental_vacuum(N)).
0 disables the vacuum step.
freelist_threshold_pages: u32Only run the vacuum step once the freelist has at least this many pages — so a quiet database is left untouched and the step is not churned for a handful of pages.
wal_checkpoint: boolTake a PRAGMA wal_checkpoint(PASSIVE) to bound WAL growth.
Trait Implementations§
Source§impl Clone for MaintenanceOptions
impl Clone for MaintenanceOptions
Source§fn clone(&self) -> MaintenanceOptions
fn clone(&self) -> MaintenanceOptions
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 MaintenanceOptions
impl Debug for MaintenanceOptions
Source§impl Default for MaintenanceOptions
impl Default for MaintenanceOptions
Source§fn default() -> MaintenanceOptions
fn default() -> MaintenanceOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for MaintenanceOptions
impl PartialEq for MaintenanceOptions
impl Copy for MaintenanceOptions
impl Eq for MaintenanceOptions
impl StructuralPartialEq for MaintenanceOptions
Auto Trait Implementations§
impl Freeze for MaintenanceOptions
impl RefUnwindSafe for MaintenanceOptions
impl Send for MaintenanceOptions
impl Sync for MaintenanceOptions
impl Unpin for MaintenanceOptions
impl UnsafeUnpin for MaintenanceOptions
impl UnwindSafe for MaintenanceOptions
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.