This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
wget -O /etc/apt/sources.list https://gist.github.com/benders/8426266/raw/b4969acb524ba727b64cf8eaee7a6a31be8ae6fb/precise-sources.list | |
apt-get update | |
wget -O /tmp/pe3-install.sh https://gist.github.com/benders/8426266/raw/b1d4c9b6ea41839b74842f05f2ae9efba7a10394/ubuntu-pe-3-install.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finds unused indexes in a mysql database | |
SELECT | |
t.TABLE_SCHEMA, | |
t.TABLE_NAME, | |
s.INDEX_NAME, | |
s.COLUMN_NAME, | |
s.SEQ_IN_INDEX, | |
( SELECT MAX(SEQ_IN_INDEX) | |
FROM INFORMATION_SCHEMA.STATISTICS s2 |