All Projects → ankane → Pghero.sql

ankane / Pghero.sql

Licence: mit
Postgres insights made easy

Labels

Projects that are alternatives of or similar to Pghero.sql

Bible Database
Bible databases as XML, JSON, SQL & SQLITE3 Database format for various languages. Developers can download it freely for their development works. Freely received, freely give.
Stars: ✭ 111 (-28.39%)
Mutual labels:  plpgsql
Partition magic
Скрипт-сниппет для Postgresql на plpgsql, позволяющий лёгко, быстро и просто создавать партицированные таблицы в вашем проекте, а также изменять, добавлять и удалять данные.
Stars: ✭ 120 (-22.58%)
Mutual labels:  plpgsql
Postgresql Event Sourcing
postgresql event sourcing
Stars: ✭ 146 (-5.81%)
Mutual labels:  plpgsql
Vocabulary V5.0
PALLAS: Build process for OMOP Standardized Vocabularies. Currently not available as independent release. Therefore, do not clone or try to replicate. It is work in progress and not ready for replication.
Stars: ✭ 114 (-26.45%)
Mutual labels:  plpgsql
Sqlite Parser
An ANTLR4 grammar for SQLite statements.
Stars: ✭ 119 (-23.23%)
Mutual labels:  plpgsql
Ccap
open source and transparent cryptocurrency analysis platform
Stars: ✭ 128 (-17.42%)
Mutual labels:  plpgsql
Common schema
DBA's framework for MySQL
Stars: ✭ 108 (-30.32%)
Mutual labels:  plpgsql
Chicago Atlas
View citywide information about health trends and take action near you to improve your own health.
Stars: ✭ 152 (-1.94%)
Mutual labels:  plpgsql
Mytap
MySQL Unit Testing Suite
Stars: ✭ 118 (-23.87%)
Mutual labels:  plpgsql
Hierarchy Data Closure Table
This is a mysql and postgresql store procedure and trigger implementation of closure table in RDBMS about hierarchy data model.
Stars: ✭ 135 (-12.9%)
Mutual labels:  plpgsql
Scaledger
A double-entry accounting database with a typed GraphQL API
Stars: ✭ 115 (-25.81%)
Mutual labels:  plpgsql
Pg Auth
A complete authentication system built in Postgres using schemas and functions
Stars: ✭ 117 (-24.52%)
Mutual labels:  plpgsql
Pg jobmon
PostgreSQL extension which provides persistent logging within transactions and functions.
Stars: ✭ 128 (-17.42%)
Mutual labels:  plpgsql
Node Sqlcipher
SQLCipher bindings for Node
Stars: ✭ 114 (-26.45%)
Mutual labels:  plpgsql
Opm Core
Central module of the OPM suite
Stars: ✭ 148 (-4.52%)
Mutual labels:  plpgsql
Triprecord
咔咔出行——基于高德地图API,Vue+Express实现的移动端webapp,服务器受到攻击网站暂时下掉了
Stars: ✭ 1,495 (+864.52%)
Mutual labels:  plpgsql
Temporal tables
Stars: ✭ 126 (-18.71%)
Mutual labels:  plpgsql
Cisl
Columnstore Indexes Scripts Library
Stars: ✭ 155 (+0%)
Mutual labels:  plpgsql
Adventureworks For Postgres
Set up the AdventureWorks sample database for use with Postgres
Stars: ✭ 148 (-4.52%)
Mutual labels:  plpgsql
Subzero Starter Kit
Starter Kit and tooling for authoring GraphQL/REST API backends with subZero
Stars: ✭ 136 (-12.26%)
Mutual labels:  plpgsql

PgHero.sql

Note: This has been replaced with PgHero.

Postgres insights made easy

Supports PostgreSQL 9.4+

A big thanks to Craig Kerstiens and Heroku for the initial queries 👏

Features

Queries

View all running queries with:

SELECT * FROM pghero_running_queries;

Queries running for longer than five minutes

SELECT * FROM pghero_long_running_queries;

Queries can be killed by pid with:

SELECT pghero_kill(123);

Kill all running queries with:

SELECT pghero_kill_all();

Index Usage

All usage

SELECT * FROM pghero_index_usage;

Missing indexes

SELECT * FROM pghero_missing_indexes;

Unused Indexes

SELECT * FROM pghero_unused_indexes;

Space

Largest tables and indexes

SELECT * FROM pghero_relation_sizes;

Cache Hit Ratio

SELECT pghero_index_hit_rate();

and

SELECT pghero_table_hit_rate();

Both should be above 99%.

Install

Run this command from your shell:

curl https://raw.githubusercontent.com/ankane/pghero.sql/master/install.sql | psql db_name

or copy its contents into a SQL console.

Uninstall

curl https://raw.githubusercontent.com/ankane/pghero.sql/master/uninstall.sql | psql db_name

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].