simon-engledew / gocmdpev Goto Github PK
View Code? Open in Web Editor NEWA command-line GO Postgres query visualizer, heavily inspired by pev (https://github.com/AlexTatiyants/pev)
License: MIT License
A command-line GO Postgres query visualizer, heavily inspired by pev (https://github.com/AlexTatiyants/pev)
License: MIT License
Hi, can I install this using homebrew please?
Hi,
I installed using the homebrew instructions from the readme in master:
brew tap simon-engledew/gocmdpev
brew install gocmdpev
Tried to do:
pbpaste | sed '1s/^/EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) /' | psql -qXAt <DATABASE> | gocmdpev
and got a "segmentation fault" error.
Tried this version of gocmdpev on a Rails 5 installation and got:
irb(main):002:0> Coach.all.eyeballs.explain
Coach Load (1.0ms) SELECT "coaches".* FROM "coaches"
=> ["Seq Scan on public.coaches (cost=0.00..15.60 rows=560 width=116) (actual time=0.005..0.006 rows=11 loops=1)\n Output: id, first_name, last_name, email, created_at, updated_at\n Buffers: shared hit=1\nPlanning Time: 0.042 ms\nExecution Time: 0.014 ms"]
irb(main):003:0> Coach.all.eyeballs.gocmdpev
Coach Load (0.5ms) SELECT "coaches".* FROM "coaches"
[[{"Plan"=>{"Node Type"=>"Seq Scan", "Parallel Aware"=>false, "Relation Name"=>"coaches", "Schema"=>"public", "Alias"=>"coaches", "Startup Cost"=>0.0, "Total Cost"=>15.6, "Plan Rows"=>560, "Plan Width"=>116, "Actual Startup Time"=>0.005, "Actual Total Time"=>0.006, "Actual Rows"=>11, "Actual Loops"=>1, "Output"=>["id", "first_name", "last_name", "email", "created_at", "updated_at"], "Shared Hit Blocks"=>1, "Shared Read Blocks"=>0, "Shared Dirtied Blocks"=>0, "Shared Written Blocks"=>0, "Local Hit Blocks"=>0, "Local Read Blocks"=>0, "Local Dirtied Blocks"=>0, "Local Written Blocks"=>0, "Temp Read Blocks"=>0, "Temp Written Blocks"=>0}, "Planning Time"=>0.052, "Triggers"=>[], "Execution Time"=>0.018}]]
sh: line 1: 8581 Done cat /var/folders/cn/tqx1mz797f7dpbwwm03nb7k80000gn/T/pg-eyeballs20200410-8566-sd2ddt
8582 Segmentation fault: 11 | gocmdpev
=> nil
So the "explain" seems to work but it's the gocmdpev that is failing for some reason (or the piping of the output that is failing)...
O/S: MacOS Catalina 10.15.4
Processor: 2.8 GHz Quad-Core Intel Core i7
I'm studying a query that takes about 12 hours to run. I'm experimenting with different query planning constants and indexes to try to improve the query plan. It isn't practical to do these experiments using ANALYZE in the EXPLAIN.
Would it be a hard hack to tweak gocmdpev to not require the query to actually run (just highlight the good and bad parts of the plan)... perhaps with a command line flag?
Hi!
I'm consider, that you should change "./gopev" to "github.com/simon-engledew/gocmdpev/gopev" in main.go:5:3
I wish to output in colored HTML (for discussing/collaboration/etc).
Actually preformatted HTML block with inline coloring tags by «span» will be OK.
I tried to use https://github.com/theZiz/aha for this, but failed (no coloring detected by AHA…).
So please, make either
The one liner you have in the README is appending EXPLAIN and it's arguments to every line of my query, adding a 1 to the sed command seems to fix it?
So from this ->
pbpaste | sed 's/^/EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) /' | psql -qAt <DATABASE> | gocmdpev
to ->
pbpaste | sed '1s/^/EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) /' | psql -qAt <DATABASE> | gocmdpev
Hi I am trying to use this amazing library via python and I am having troubles installing it.
Do I first need to clone this repo before running this
"go build -buildmode=c-shared -o pycmdpev.so pybindings/*"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.