Skip to content

Instantly share code, notes, and snippets.

View igorzg's full-sized avatar
🎯
Focusing

igorzg igorzg

🎯
Focusing
View GitHub Profile
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
# downgrade to php5.4 first
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable -y
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5
# install ajenti
wget -O- https://raw.github.com/Eugeny/ajenti/master/scripts/install-ubuntu.sh | sudo sh