Skip to content

Instantly share code, notes, and snippets.

@anvk
anvk / psql_useful_stat_queries.sql
Last active July 12, 2024 11:28
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
@jonlabelle
jonlabelle / iis7_command_line_tool.md
Created April 17, 2014 21:41
IIS 7 Command Line Tool

IIS 7 Command Line Tool

AppCmd.exe IIS 7 command-line tool used to perform common IIS administrative tasks such as creating new sites, stopping/starting services, and viewing status of the site.

Usage

appcmd (command) (object-type) <identifier> </parameter1:value1 ...>
@jednano
jednano / gitcom.md
Last active May 31, 2023 08:23
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 16, 2024 15:14
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'