Giter Site home page Giter Site logo

explain's Introduction

Explain

Github actions Build Status

Transform postgresql explain to a graph.

Install

Packaging status

If you use Arch Linux, explain is available in AUR.

Manually

git clone https://github.com/sanpii/explain
cd explain
make
sudo make install

Launch

Launch this program like psql and use dot to generate image:

$ explain --command 'select 1' database | dot -Tpng > explain.png
$ explain --help
explain 1.0.0

USAGE:
    explain [FLAGS] [OPTIONS] [dbname]

FLAGS:
        --analyse     this option executes explain analyse /!\ Be carful, that executes the query!
    -n, --dry-run     Don’t execute the query, the input is already an explain plan in JSON
        --help        Prints help information
    -W, --password    Prompt for a password before connecting to a database
    -V, --version     Prints version information

OPTIONS:
    -c, --command <command>    Specifies the command to execute
    -f, --file <file>          Read commands from the file, rather than standard input
    -h, --host <host>          Specifies the host name of the machine on which the server is running
    -o, --output <output>      Put output into file
    -p, --port <port>          Specifies the TCP port on which the server is listening for connections
    -U, --user <user>          Connect to the database as the user

ARGS:
    <dbname>    Specifies the name of the database to connect to

explain's People

Contributors

hetoug avatar sanpii 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

Watchers

 avatar  avatar  avatar  avatar

explain's Issues

Accept postgres urls as dbname

Elephantry accepts urls like postgres://user:password@host:port/dbname as connetion strings.
explain should also accept these.

Negative cost

In plan 3, cost of the 2nd node "append" is -0.01.

Support escapted characteres in .pgpass

    #[test]
    fn parse_escape() {
        let pgpass = PgPass::from_str("local\\:host:*:post\\\\gres:*:1234");

        assert_eq!(Some("1234".to_string()), pgpass.find("local:host", 5432, "post\\gres", "postgres"));
    }

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.