Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.txt
kill_idle.sh
kill_long_running.sh
maintain.sh
oracle_sessions.sh
sql_sessions.sh

README.txt

README file for Scripts
****************************************************************************************
Site: http://www.PivotalGuru.com
Author: Jon Roberts
Email: jgronline@gmail.com
Date: 2014-12-10
****************************************************************************************

Scripts for maintaining Greenplum Database and HAWQ.

1.  maintain.sh
HAWQ and GPDB
- VACUUM ANALYZE all tables in pg_catalog

GPDB Only
- REINDEX the system catalog (reindexdb -s)
- ANALYZE tables with missing statistics (gp_toolkit.gp_stats_missing).  A partitioned 
  table always shows up here so I ignore those and check for partitions/inherited tables 
  with missing statistics.
- VACUUM heap tables near the transaction wraparound point
- VACUUM heap tables with bloat (gp_toolkit.gp_bloat_diag)
- VACUUM AO tables with bloat (gp_toolkit.__gp_aovisimap_hidden_info). I'm using 5% as 
  the threshold.

2.  kill_idle.sh
Kill idle sessions that have not executed anything for at least 1 hour.

3.  kill_long_running.sh
Kill long running queries that have executed for at least 1 hour.  There is typically 
room for improvement if a query executes for over an hour.

4.  sql_sessions.sh
Get session information from a remote SQL Server database.

5.  oracle_sessions.sh
Get session information from a remote Oracle database.
You can’t perform that action at this time.