pub struct ExplainPlan {
pub scan_type: ScanType,
pub table: String,
pub index: Option<String>,
pub rows: u64,
pub extra: Vec<String>,
}Expand description
解析后的执行计划摘要
Fields§
§scan_type: ScanType扫描类型
table: String涉及的表名(未知时为 "<unknown>")
index: Option<String>使用的索引名(全表扫描/未知时为 None)
rows: u64预估扫描行数
extra: Vec<String>额外信息(filter/using where 等)
Implementations§
Source§impl ExplainPlan
impl ExplainPlan
Sourcepub fn missing_index(&self, row_threshold: u64) -> bool
pub fn missing_index(&self, row_threshold: u64) -> bool
缺失索引判断:全表扫描或行数超阈值且未使用索引
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