summaryrefslogtreecommitdiff
path: root/wired/old/published/Webmonkey/Monkey_Bites/2007/03.05.07/mail.txt
diff options
context:
space:
mode:
Diffstat (limited to 'wired/old/published/Webmonkey/Monkey_Bites/2007/03.05.07/mail.txt')
-rw-r--r--wired/old/published/Webmonkey/Monkey_Bites/2007/03.05.07/mail.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/wired/old/published/Webmonkey/Monkey_Bites/2007/03.05.07/mail.txt b/wired/old/published/Webmonkey/Monkey_Bites/2007/03.05.07/mail.txt
new file mode 100644
index 0000000..00827c4
--- /dev/null
+++ b/wired/old/published/Webmonkey/Monkey_Bites/2007/03.05.07/mail.txt
@@ -0,0 +1,24 @@
+Our friend Reid sent us a handy tip for speeding up Apple's mail.app over the weekend. The trick is the force optimize the SQLite database that Mail uses to reference messages and metadata.
+
+As with any database, Mail's reference tables can get bloated over time, but this line of code will slim things down. Quit Mail.app and then open up the Terminal and enter this line (be sure to back up your ~/Library/Mail folder before proceeding):
+
+ sqlite3 ~/Library/Mail/Envelope\ Index vacuum;
+
+Assuming you haven't moved your Mail data from the default location, that line should optimize Mail's SQLite data and possibly speed things up a but.
+
+The SQL [docs for the vacuum command][1] say:
+
+>The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure.
+
+
+I can't say how safe this is, neither of us had any problems, but YMMV. Remember to quit Mail.app first and back up your ~/Library/Mail folder before running the command just to be on the safe side.
+
+If you'd like to find out just how much space you're saving run this command, which will output your index file size in megabytes, before and after the optimization command:
+
+ ls -lh ~/Library/Mail/Envelope\ Index
+
+That .
+
+Many thanks to Reid.
+
+[1]: http://www.sqlite.org/lang_vacuum.html "SQLite Docs: Vacuum" \ No newline at end of file