gocmdpev

命令行 GO Postgres 查询可视化工具,灵感主要来自 pev (https://github.com/AlexTatiyants/pev)。「A command-line GO Postgres query visualizer, heavily inspired by pev (https://github.com/AlexTatiyants/pev)」

Github stars Tracking Chart

gocmdpev

A command-line GO Postgres query visualizer, heavily inspired by the excellent (web-based) pev

image

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:

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:

pbpaste, sed '1s/^/EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) /', psql -qXAt <DATABASE>, gocmdpev

Python 3 Bindings

Tested on python 3.4.2 built with golang:1.8.3-jessie.

Build:

go build -buildmode=c-shared -o pycmdpev.so pybindings/*
import pycmdpev

pycmdpev.visualize("<JSON EXPLAIN STRING>")

Using with Ruby on Rails

Try the pg-eyeballs gem

Main metrics

Overview
Name With Ownersimon-engledew/gocmdpev
Primary LanguageGo
Program languageGo (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2016-05-21 02:19:54
Pushed At2023-02-25 05:26:13
Last Commit At2020-06-02 19:56:01
Release Count4
Last Release Name1.0.2 (Posted on )
First Release Nameuntagged-c6a8c1b2ea02ab1c5c53 (Posted on )
用户参与
Stargazers Count776
Watchers Count8
Fork Count13
Commits Count56
Has Issues Enabled
Issues Count6
Issue Open Count0
Pull Requests Count2
Pull Requests Open Count2
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private