Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Intermix API Utilities

Copyright 2017 Intermix Software, Inc. All Rights Reserved.

Licensed under the MIT License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

Intermix is an analytics platform that instruments Amazon Redshift to improve performance, reduce costs, and eliminate downtime. Our SaaS product intelligently tunes databases in the cloud, provides deep analytics, recommendations, and predictions, so companies don't have to hire DBA experts, throw money at performance problems, or deal with slow queries.

Getting Started

These instructions will help set up your environment to execute these scripts locally.


The following are required to create a local development instance.

  • Python 2.7.6+ (Python 2.7.12 is recommended)
  • PIP Package manager for Python

To install the prerequisites:

pip install -r ./requirements.txt

Configuration Settings

The file contains sensitive data for your environment. Simply rename the file and edit the file accordingly.



The following utility will generate a bash script that can be executed to reclaim deleted space and update row statistics on all tables in your cluster. Only tables that have space to be reclaimed will be touched.

The utility will first call the Intermix API to retrieve a list of tables whose statistics are > 10% stale, and then generate the script and include all necessary information to log into your Redshift cluster. When you run the script, you will be prompted for your user password.

Note: You must first create a file and enter information that will be used to generate the script.

This utility will not access your cluster, it will simply generate a bash script.


Generates a script to execute 'vacuum delete only' and 'analyze' on tables that require it.

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Enter a filename or "STDOUT"


python ./ -o

Then execute the bash script with

bash ./

User Analytics

Will output a CSV to STDOUT that contains user statistics for the past 7 days.


Generates a CSV for per-user statistics including query counts, latency, memory usage, and more.

<no optional arguments>


python ./


No description, website, or topics provided.




No releases published


No packages published


You can’t perform that action at this time.