Speed up Mail.app

Mail.app icon
+
SQLite logo
+
vacuum
=
BRRRRRUUUUUUUUUMMMMM!

Anyone that use Mail.app (the “official” mail client on Mac OS X) knows that the greater mailboxes become, the slower Mail.app goes. I don’t know how many email I have, but the oldest is from the 2002 (I have cutted older because they became useless).

Today, I found an interesting link on TUAW: A faster way to speed up Mail.app on Hawk Wings.

Starting from that tips, I have expanded it to vacuum every table in the SQLite3 database used from Mail.app to index our emails.

Continue to see the mini-howto.

  1. Step 01: Quit Mail.app (and backup your ~/Library/Mail - nd Nemo)
  2. Step 02: Open Terminal.app
  3. Step 03: type cd ~/Library/Mail (the configuration directory of Mail.app)
  4. Step 04: type sqlite3 Envelope\ Index (Opens the console of SQLite3 on the index-db of Mail.app)
  5. Step 05: type .table to list every table in the db (.help for help)
  6. Step 06: type vacuum X where X is the name of the table you want to optimize (every table listed in the Step 05)
  7. Step 07: CTRL+D to quit the console of SQLite3
  8. Step 08: Start Mail.app and enjoy the speed-bump!

Frankly: I don’t assume responsability of problems, damage or other things that will happen to your Mail.app if you do it in the wrong way. It’s is NOT an howto from Apple: it’s from one that knows something about RDBMS.

Put this post/page on your Social Bookmarking System

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • YahooMyWeb
  • Ma.gnolia
  • blogmarks
  • BlinkList
  • co.mments
  • Shadows
  • Furl
  • Digg
  • Google
  • Live
  • Reddit
  • Slashdot

4 Comments so far »

  1. Nemo wrote on March 5, 2007 @ 14:29

    I suggest u to include another step called “backup” ;)

  2. Detro wrote on March 5, 2007 @ 14:57

    You are right ;)

  3. Richard Hipp wrote on March 9, 2007 @ 13:27

    The “X” after “vacuum” in step 6 doesn’t do anything. You
    can omit it. For that matter, you can combine steps 4
    through 7 into a single command. Just type:

    sqlite3 “~/Library/Mail/Envelope Index” vacuum

  4. Detro wrote on March 10, 2007 @ 12:02

    Thank you Richard for the tip: I’m not a SQLite3 expert. ;)

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: