What is the quickest way to find out the current size of my shared database in Heroku?
You can find them by visiting the Resources tab on your Dashboard then clicking on the DB you use. It will take you to the Addons page in another tab. Click on the Settings tab then View Credentials. Using these credentials, you can use Adminer to login to the DB.
To determine the size of a database, type the following command. Replace dbname with the name of the database that you want to check: Copy SELECT pg_size_pretty( pg_database_size('dbname') ); Psql displays the size of the database.
"You could run heroku pg:psql to fire up a Postgres console, then issue \d to see all tables, and \d tablename to see details for a particular table." You can also type select * from tablename; to view the table contents.
Heroku Postgres is a managed SQL database service provided directly by Heroku. You can access a Heroku Postgres database from any language with a PostgreSQL driver, including all languages officially supported by Heroku.
running heroku info
shows:
Data size: 480k Addons: Basic Logging, Shared Database 5MB
Data size being the size of the shared database, here with a limit of 5MB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With