ExecutionPlan
public struct ExecutionPlan : CustomStringConvertibleA structure representing the execution plan for a query in the database.
The ExecutionPlan provides details about how a query will be executed,
including the collection being queried, the predicates applied, the estimated
number of documents to scan, and the index strategy used.
- Properties: - collection: The name of the collection being queried.
- predicates: An array of tuples representing the query predicates, where each tuple contains a field name and a query operator.
- estimatedDocsToScan: The estimated number of documents that will be scanned during the query execution.
- shardsToSkip: The number of shards that can be skipped during query execution.
- usedIndex: The name of the index used for the query, if any. If no index is used,
this will be nil.
- indexStrategy: The strategy used for indexing during query execution.
 
- Conforms to: - CustomStringConvertible: Provides a human-readable description of the execution plan.
 
- 
                  
                  Undocumented DeclarationSwift public let collection: String
- 
                  
                  Undocumented DeclarationSwift public let predicates: [(field: String, op: QueryOperator)]
- 
                  
                  Undocumented DeclarationSwift public let estimatedDocsToScan: Int
- 
                  
                  Undocumented DeclarationSwift public let shardsToSkip: Int
- 
                  
                  Undocumented DeclarationSwift public let usedIndex: String?
- 
                  
                  Undocumented DeclarationSwift public let indexStrategy: IndexStrategy
- 
                  
                  DeclarationSwift public var description: String { get }
- 
                  
                  An enumeration that defines the strategies for querying data in the database. - fullScan: Represents a strategy where the entire dataset is scanned to find matching results.
- indexOnly: Represents a strategy where only the index is used to retrieve results, without scanning the full dataset.
- hybrid: Represents a strategy that combines both index usage and partial dataset scanning to optimize query performance.
 DeclarationSwift public enum IndexStrategy : CustomStringConvertible
 View on GitHub
View on GitHub