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
| var collectionNames = db.getCollectionNames(), stats = []; | |
| collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
| stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
| for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } |
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
| #!/usr/bin/env bash | |
| # | |
| # Compile and install MongoDB with SSL support | |
| # tested an works on Ubuntu 12.04 LTS x64 and Ubuntu 14.04 LTS x64 | |
| # | |
| set -e | |
| set -u | |
| set -o pipefail |
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
| SET foreign_key_checks = 0; | |
| -- Last 5 Search Terms / Top 5 Search Terms | |
| TRUNCATE TABLE catalogsearch_fulltext; | |
| TRUNCATE TABLE catalogsearch_query; | |
| TRUNCATE TABLE catalogsearch_result; | |
| -- Dashboard stats (e.g. "Most Viewed Products" etc) | |
| TRUNCATE TABLE report_compared_product_index; | |
| TRUNCATE TABLE report_event; |
NewerOlder