pub struct ExplainPlan {
pub scan_type: ScanType,
pub table: String,
pub index: Option<String>,
pub rows: u64,
pub extra: Vec<String>,
}Expand description
Parsed execution plan summary
Fields§
§scan_type: ScanTypeScan type
table: StringInvolved table name ("<unknown>" when unknown)
index: Option<String>Index name used (None for full table scan/unknown)
rows: u64Estimated scanned row count
extra: Vec<String>Extra info (filter/using where, etc.)
Implementations§
Source§impl ExplainPlan
impl ExplainPlan
pub fn new( scan_type: ScanType, table: impl Into<String>, index: Option<String>, rows: u64, extra: Vec<String>, ) -> Self
pub fn is_full_table_scan(&self) -> bool
pub fn has_index(&self) -> bool
pub fn is_large_result(&self, threshold: u64) -> bool
pub fn table_name(&self) -> &str
pub fn index_name(&self) -> Option<&str>
pub fn estimated_rows(&self) -> u64
pub fn extra_info(&self) -> &[String]
pub fn has_extra(&self, keyword: &str) -> bool
pub fn summary(&self) -> String
Sourcepub fn missing_index(&self, row_threshold: u64) -> bool
pub fn missing_index(&self, row_threshold: u64) -> bool
Missing index check: full table scan or row count exceeds threshold and no index used
Trait Implementations§
Source§impl Clone for ExplainPlan
impl Clone for ExplainPlan
Source§fn clone(&self) -> ExplainPlan
fn clone(&self) -> ExplainPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExplainPlan
impl Debug for ExplainPlan
impl Eq for ExplainPlan
Source§impl PartialEq for ExplainPlan
impl PartialEq for ExplainPlan
impl StructuralPartialEq for ExplainPlan
Auto Trait Implementations§
impl Freeze for ExplainPlan
impl RefUnwindSafe for ExplainPlan
impl Send for ExplainPlan
impl Sync for ExplainPlan
impl Unpin for ExplainPlan
impl UnsafeUnpin for ExplainPlan
impl UnwindSafe for ExplainPlan
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