Giter Site home page Giter Site logo

gocmdpev's People

Contributors

asenyshyn avatar bradurani avatar simon-engledew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gocmdpev's Issues

Segmentation fault

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

without ANALYZE?

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?

HTML output. Or AHA-compatibility

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

  • HTML output
  • Or color codes compatible with some software, that can convert output to HTML.

One Liner Adjustment

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

Lack of python-binding documentation

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/*"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.