{"repo":"pawurb/ruby-pg-extras","free":true,"listed":false,"github":"https://github.com/pawurb/ruby-pg-extras","clone":"git clone https://github.com/pawurb/ruby-pg-extras.git","description":"Ruby PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.","language":"Ruby","stars":171,"topics":["database","performance","postgresql","ruby"],"license":"MIT","category":"databases-storage","readme_excerpt":"Ruby PG Extras Ruby port of Heroku PG Extras with several additions and improvements. The goal of this project is to provide powerful insights into the PostgreSQL database for Ruby apps that are not using the Heroku PostgreSQL plugin. Queries can be used to obtain information about a Postgres instance, that may be useful when analyzing performance issues. This includes information about locks, index usage, buffer cache hit ratios and vacuum statistics. Ruby API enables developers to easily integrate the tool into e.g. automatic monitoring tasks. You can check out this blog post for detailed step by step tutorial on how to optimize PostgreSQL using PG Extras library. Alternative versions: - Ruby on Rails - Rust - NodeJS - Elixir - Python - Haskell Installation In your Gemfile calls and outliers queries require pg stat statements extension. You can check if it is enabled in your database by running: You should see the similar line in the output: ssl used requires sslinfo extension, and buffercache usage / buffercache usage queries need pg buffercache . You can enable them all by running: Usage Gem expects the ENV['RUBY PG EXTRAS DATABASE URL'] or ENV['DATABASE URL'] value in the following format: Alternatively you can set it using the module class method: You can run queries using a simple Ruby API: By default the ASCII table is displayed, to change to format you need to specify the in format parameter ( [:display table, :hash, :array, :raw] options are available): Some methods","default_branch":null,"files":null,"tree":[],"storefront":"/r/pawurb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pawurb/ruby-pg-extras/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}