Skip to content

cristalhq/pgstats

Repository files navigation

pgstats

Build Status GoDoc Go Report Card Coverage

Postgres statistics.

Features

Install

Go version 1.13

go get github.com/cristalhq/pgstats

Example

var db *sql.DB
// init db

stats, err := New(db)
if err != nil {
    ...
}

all, err := stats.AllIndexes()
if err != nil {
    ...
}

for _, index := range all {
    fmt.Printf("index name: %v\n", index.Indexrelname)
}

Documentation

See these docs.

License

MIT License.