burrito-brothers / shiba

Catch bad SQL queries before they cause problems in production
https://shiba-sql.com
Other
293 stars 14 forks source link

Eac/dump stats #9

Closed eac closed 5 months ago

eac commented 5 years ago

This is turning into a thing, but should make pulling stats much more pleasant.

Query raw table statistics from the database. Supports gathering statistics from production

Required:
    -s, --server SERVER              The database server. Either 'mysql' or 'postgres'
    -d, --directory APP_DIR          The application directory on the server.

Options:
    -h, --host HOST                  The host to execute the statistics query from. Defaults to localhost.
    -e, --environment ENVIRONMENT    The database environment. Defaults to 'production'.

Advanced options:
        --script                     Print a customizable script instead of executing.
    -f, --file FILE                  Converts the output file from a customized script to usable stats.
        --client CLIENT              The client command to run, defaults to 'rails dbconsole'. Can use 'mysql' and 'psql'.

SSH connection options:
    -p, --proxy PROXY_HOST           The proxy (jump server) to connect to first.

Common options:
        --verbose                    Verbose/debug mode
        --help                       Show this message
        --version                    Show version
osheroff commented 5 years ago

my friend, you have missed my work around getting average column sizes. I am sorry, my friend.

eac commented 5 years ago

Oh, dang