Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use File::Spec;
use Cwd qw(abs_path);
$\ = $/;
my ( $input_dir, $output_file ) = @ARGV;
usage() unless $input_dir && $output_file;
$input_dir = abs_path($input_dir);
@krainezol
krainezol / psql_useful_stat_queries.sql
Created September 18, 2019 11:58 — forked from anvk/psql_useful_stat_queries.sql
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables