pub enum ScanType {
FullTable,
IndexRange,
IndexLookup,
UniqueLookup,
Other,
}Expand description
扫描类型分类(各方言扫描方式的统一抽象)
Variants§
FullTable
全表扫描(MySQL ALL / PG Seq Scan / SQLite SCAN / Oracle TABLE ACCESS FULL / MSSQL Table Scan)
IndexRange
索引范围扫描(MySQL range / PG Index Scan / SQLite SEARCH ... USING INDEX / Oracle INDEX RANGE SCAN / MSSQL Index Scan)
IndexLookup
索引等值/点查(MySQL ref/eq_ref / Oracle INDEX UNIQUE SCAN)
UniqueLookup
主键/唯一索引点查(MySQL const / PG Index Scan ... pkey / MSSQL Index Seek)
Other
其他(物化、排序、聚合等)
Implementations§
Source§impl ScanType
impl ScanType
Sourcepub fn is_full_table_scan(&self) -> bool
pub fn is_full_table_scan(&self) -> bool
是否为全表扫描(性能警告触发条件)
pub fn as_str(&self) -> &'static str
pub fn all() -> &'static [ScanType]
pub fn is_index_scan(&self) -> bool
pub fn is_index_lookup(&self) -> bool
pub fn parse_name(s: &str) -> Option<ScanType>
Trait Implementations§
impl Copy for ScanType
impl Eq for ScanType
impl StructuralPartialEq for ScanType
Auto Trait Implementations§
impl Freeze for ScanType
impl RefUnwindSafe for ScanType
impl Send for ScanType
impl Sync for ScanType
impl Unpin for ScanType
impl UnsafeUnpin for ScanType
impl UnwindSafe for ScanType
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