Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simon-engledew/gocmdpev
A command-line GO Postgres query visualizer, heavily inspired by pev (https://github.com/AlexTatiyants/pev)
https://github.com/simon-engledew/gocmdpev
Last synced: 14 days ago
JSON representation
A command-line GO Postgres query visualizer, heavily inspired by pev (https://github.com/AlexTatiyants/pev)
- Host: GitHub
- URL: https://github.com/simon-engledew/gocmdpev
- Owner: simon-engledew
- License: mit
- Created: 2016-05-21T02:19:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T05:26:13.000Z (over 1 year ago)
- Last Synced: 2024-05-22T18:32:29.820Z (6 months ago)
- Language: Go
- Size: 780 KB
- Stars: 783
- Watchers: 9
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocmdpev
A command-line GO Postgres query visualizer, heavily inspired by the excellent (web-based) [pev](https://github.com/AlexTatiyants/pev)![image](https://cloud.githubusercontent.com/assets/14410/15449922/bd129a10-1f83-11e6-9480-b4c103d7c0a5.png)
## Usage
```
go get -u github.com/simon-engledew/gocmdpev
```or via Homebrew:
```
brew tap simon-engledew/gocmdpev
brew install gocmdpev
```Generate a query plan with all the trimmings by prefixing your query with:
```pgsql
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)
```Then pipe the resulting query plan into `gocmdpev`.
On MacOS you can just grab a query on your clipboard and run this one-liner:
```bash
pbpaste | sed '1s/^/EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) /' | psql -qXAt | gocmdpev
```## Python 3 Bindings
Check out the repository and run `make python3` to build and test the bindings.
## Using with Ruby on Rails
Try the [`pg-eyeballs`](https://github.com/bradurani/pg-eyeballs) gem