Documentation ¶
Index ¶
- type ActiveLock
- type Activity
- type Bloat
- type DBConnection
- func (dbConnection *DBConnection) Close()
- func (dbConnection *DBConnection) GetActiveLocks() (activeLocks []ActiveLock, err error)
- func (dbConnection *DBConnection) GetActivity() (activity []Activity, err error)
- func (dbConnection *DBConnection) GetMissingIndexes() (missingIndexes []MissingIndex, err error)
- func (dbConnection *DBConnection) GetTableCacheHitRatios() (tableCacheHitRatios []TableCacheHitRatio, err error)
- func (dbConnection *DBConnection) GetTableSizes() (tableSizes []TableSize, err error)
- func (dbConnection *DBConnection) GetUselessIndexes() (uselessIndexes []UselessIndex, err error)
- func (dbConnection *DBConnection) GetVacuumStats() (vacuumStats []VacuumStat, err error)
- func (dbConnection *DBConnection) ListBloat() (bloat []Bloat, err error)
- type Database
- type DatabaseName
- type MissingIndex
- type PG
- type TableCacheHitRatio
- type TableSize
- type UselessIndex
- type VacuumStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveLock ¶
type ActiveLock struct { RelationName string `db:"relname" table:"Relation Name"` LockType string `db:"locktype" table:"Lock Type"` Page string `db:"page"` VirtualTransaction string `db:"virtualtransaction" table:"Virtual Transaction"` PID string `db:"pid"` Mode string `db:"mode"` Granted string `db:"granted"` }
type DBConnection ¶
type DBConnection struct {
// contains filtered or unexported fields
}
func NewDBConnection ¶
func NewDBConnection(dbName DatabaseName) (*DBConnection, error)
func (*DBConnection) Close ¶
func (dbConnection *DBConnection) Close()
func (*DBConnection) GetActiveLocks ¶
func (dbConnection *DBConnection) GetActiveLocks() (activeLocks []ActiveLock, err error)
func (*DBConnection) GetActivity ¶
func (dbConnection *DBConnection) GetActivity() (activity []Activity, err error)
func (*DBConnection) GetMissingIndexes ¶
func (dbConnection *DBConnection) GetMissingIndexes() (missingIndexes []MissingIndex, err error)
func (*DBConnection) GetTableCacheHitRatios ¶
func (dbConnection *DBConnection) GetTableCacheHitRatios() (tableCacheHitRatios []TableCacheHitRatio, err error)
func (*DBConnection) GetTableSizes ¶
func (dbConnection *DBConnection) GetTableSizes() (tableSizes []TableSize, err error)
func (*DBConnection) GetUselessIndexes ¶
func (dbConnection *DBConnection) GetUselessIndexes() (uselessIndexes []UselessIndex, err error)
func (*DBConnection) GetVacuumStats ¶
func (dbConnection *DBConnection) GetVacuumStats() (vacuumStats []VacuumStat, err error)
func (*DBConnection) ListBloat ¶
func (dbConnection *DBConnection) ListBloat() (bloat []Bloat, err error)
type Database ¶
type Database struct { Name DatabaseName `db:"datname"` Size int `db:"size" table:"-"` FormattedSize string `db:"formatted_size" table:"Size"` CommitRatio string `db:"commit_ratio" table:"Commit Ratio"` CacheHitRation string `db:"cache_hit_ratio" table:"Cache Hit Ratio"` BlocksRead int `db:"blks_read" table:"Blocks Read"` }
type DatabaseName ¶
type DatabaseName string
type MissingIndex ¶
type MissingIndex struct { RelationName string `db:"relname"` TooMuchSeq int `db:"too_much_seq" table:"Too Much Seq"` MissingIndex string `db:"missing_index" table:"Missing Index?"` RelationSize string `db:"rel_size" table:"Size"` SequentialScans int `db:"seq_scan" table:"Sequential Scans"` IndexScans int `db:"idx_scan" table:"Index Scans"` }
type TableCacheHitRatio ¶
type TableCacheHitRatio struct { Table string `db:"table_name"` DiskHits int `db:"disk_hits" table:"Disk Hits"` PercentDiskHits string `db:"percent_disk_hits" table:"% Disk Hits"` PercentCacheHits string `db:"percent_cache_hits" table:"% Cache Hits"` TotalHits int `db:"total_hits" table:"Total Hits"` }
type UselessIndex ¶
type VacuumStat ¶
type VacuumStat struct { Table string `db:"table"` LastVacuum string `db:"last_vacuum" table:"Last Vacuum"` LastAutoVacuum string `db:"last_autovacuum" table:"Last Auto-Vacuum"` RowCount string `db:"rowcount" table:"Row Count"` DeadRowCount string `db:"dead_rowcount" table:"Dead Row Count"` RowsPerPage string `db:"rows_per_page" table:"Rows per Page"` AutoVacuumThreshold string `db:"autovacuum_threshold" table:"Auto-Vacuum Threshold"` WillVacuum string `db:"will_vacuum" table:"Will Vacuum"` }
Click to show internal directories.
Click to hide internal directories.