Documentation
¶
Overview ¶
Package pgexplain provides tools for Postgres explain processing.
Index ¶
Constants ¶
View Source
const ( Limit NodeType = "Limit" Append = "Append" Sort = "Sort" NestedLoop = "Nested Loop" MergeJoin = "Merge Join" Hash = "Hash" HashJoin = "Hash Join" Aggregate = "Aggregate" Hashaggregate = "Hashaggregate" SequenceScan = "Seq Scan" IndexScan = "Index Scan" IndexOnlyScan = "Index Only Scan" BitmapHeapScan = "Bitmap Heap Scan" BitmapIndexScan = "Bitmap Index Scan" CTEScan = "CTE Scan" FunctionScan = "Function Scan" SubqueryScan = "Subquery Scan" ValuesScan = "Values Scan" ModifyTable = "Modify Table" )
View Source
const ( Byte = 1 << (iota * 10) KiByte MiByte GiByte TiByte PiByte EiByte )
IEC Sizes. kibis of bits.
View Source
const ( IByte = 1 KByte = IByte * 1000 MByte = KByte * 1000 GByte = MByte * 1000 TByte = GByte * 1000 PByte = TByte * 1000 EByte = PByte * 1000 )
SI Sizes.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EstimateDirection ¶
type EstimateDirection string
const ( Over EstimateDirection = "Over" Under = "Under" )
type Explain ¶
type Explain struct { Plan Plan `json:"Plan"` Triggers []Trigger `json:"Triggers"` QueryIdentifier uint64 `json:"Query Identifier"` Settings map[string]string `json:"Settings"` PlanningTime float64 `json:"Planning Time"` ExecutionTime float64 `json:"Execution Time"` TotalTime float64 TotalCost float64 // Buffers. LocalHitBlocks uint64 LocalReadBlocks uint64 LocalDirtiedBlocks uint64 LocalWrittenBlocks uint64 TempReadBlocks uint64 TempWrittenBlocks uint64 // IO timing. IOReadTime *float64 IOWriteTime *float64 ActualRows uint64 MaxRows uint64 MaxCost float64 MaxDuration float64 ContainsSeqScan bool }
func (*Explain) RenderPlanText ¶
func (*Explain) RenderStats ¶
type Plan ¶
type Plan struct { Plans []Plan `json:"Plans"` // Buffers. LocalHitBlocks uint64 `json:"Local Hit Blocks"` LocalReadBlocks uint64 `json:"Local Read Blocks"` LocalDirtiedBlocks uint64 `json:"Local Dirtied Blocks"` LocalWrittenBlocks uint64 `json:"Local Written Blocks"` TempReadBlocks uint64 `json:"Temp Read Blocks"` TempWrittenBlocks uint64 `json:"Temp Written Blocks"` // IO timing. IOReadTime *float64 `json:"I/O Read Time,omitempty"` // ms IOWriteTime *float64 `json:"I/O Write Time,omitempty"` // ms // Actual. ActualLoops uint64 `json:"Actual Loops"` ActualRows uint64 `json:"Actual Rows"` ActualStartupTime float64 `json:"Actual Startup Time"` ActualTotalTime float64 `json:"Actual Total Time"` // Estimates. PlanRows uint64 `json:"Plan Rows"` PlanWidth uint64 `json:"Plan Width"` StartupCost float64 `json:"Startup Cost"` TotalCost float64 `json:"Total Cost"` // WAL. WALRecords uint64 `json:"WAL Records,omitempty"` WALFPI uint64 `json:"WAL FPI,omitempty"` WALBytes uint64 `json:"WAL Bytes,omitempty"` // General. Alias string `json:"Alias"` CteName string `json:"CTE Name"` Filter string `json:"Filter"` FunctionName string `json:"Function Name"` GroupKey []string `json:"Group Key"` HashBatches uint64 `json:"Hash Batches"` HashBuckets uint64 `json:"Hash Buckets"` HashCondition string `json:"Hash Cond"` HeapFetches uint64 `json:"Heap Fetches"` IndexCondition string `json:"Index Cond"` IndexName string `json:"Index Name"` MergeCondition string `json:"Merge Cond"` JoinType string `json:"Join Type"` NodeType NodeType `json:"Node Type"` Operation string `json:"Operation"` OriginalHashBatches uint64 `json:"Original Hash Batches"` OriginalHashBuckets uint64 `json:"Original Hash Buckets"` Output []string `json:"Output"` ParallelAware bool `json:"Parallel Aware"` ParentRelationship string `json:"Parent Relationship"` PeakMemoryUsage uint64 `json:"Peak Memory Usage"` // kB RelationName string `json:"Relation Name"` RowsRemovedByFilter uint64 `json:"Rows Removed by Filter"` RowsRemovedByIndexRecheck uint64 `json:"Rows Removed by Index Recheck"` ScanDirection string `json:"Scan Direction"` Schema string `json:"Schema"` SortKey []string `json:"Sort Key"` SortMethod string `json:"Sort Method"` SortSpaceType string `json:"Sort Space Type"` SortSpaceUsed uint64 `json:"Sort Space Used"` // kB Strategy string `json:"Strategy"` SubplanName string `json:"Subplan Name"` WorkersLaunched uint `json:"Workers Launched"` WorkersPlanned uint `json:"Workers Planned"` // Calculated params. ActualCost float64 ActualDuration float64 Costliest bool Largest bool PlannerRowEstimateDirection EstimateDirection PlannerRowEstimateFactor float64 Slowest bool }
Click to show internal directories.
Click to hide internal directories.