The personal blog of Dan Warne, Australian tech journalist

The Warne Account random header image

Is Apple Mail running slow? Speed it up

March 3rd, 2007 · Comments

Tim Gaden of Hawk Wings fame (and formerly of APC X-Factor fame, sniffle) has documented an excellent tip to speed up Apple Mail.

It involves optimising the SQLite database Apple Mail uses to store indexes and subject lines of emails.

You can check your current 'envelope archive' size by entering this in the terminal:

ls -lah ~/Library/Mail/Envelope\ Index

Then to optimise it (cleans out stuff that has been marked for deletion but not actually deleted, defragments the structure, etc):

sqlite3 ~/Library/Mail/Envelope\ Index vacuum;

Then check your envelope archive size again to see the results…

ls -lah ~/Library/Mail/Envelope\ Index

It compacted my envelope archive down from 55MB to 50MB — not a huge increase, but the speed difference was dramatic.

In particular, my 'sent mail' folder which had been taking 10 – 15 seconds to open (8,000 items) now only takes two or three seconds.

Read the full post and many informative comments here.

Tags: Apple

  • Gavin
    thanks for that, lets see if speeds me up, I have THOUSANDS of Mails everywhere...
  • Chuck
    Worked great for me. Thanks!
  • Tim
    Been meaning to find a solution to my sluggish mail for weeks now. This worked like a dream. Many thanks.
  • Great!!!
    Thanks!!!
  • Jackie
    This is a fantastic tip. I've been searching the web for awhile looking for this answer. I have a fairly new computer and nowhere near the thousands of emails the other person mentioned, but I would still have to wait on Mail to catch up to my typing which was very frustrating! Thanks.
  • Bryce
    thanks a lot, seems to have worked
  • THANKS! that is so much better. [Sigh.]
  • Nick
    This is excellent!

    Many thanks, the slowness was starting to drive me crazy on my 125Mb mail (down from 137Mb, but much faster).

    What a relief

    Note that on large mailboxes, the vacuum can take a minute or two - don't panic!
  • This worked extremely well for me and will now save me a ton of time previously wasted waiting for mailboxes to load.
  • Griff
    hmm,
    now 2 of my POP mailboxes have disappeared.
    Thanks for that
  • Griff
    Make that 3 of them
    Brilliant.
    Any idea how to get them back without reloading the entire mailbox from the original server ?
  • Danilo
    Excellent! It saved me some 15m a day. Thanks!
  • WOW dropped from 137M to 129M, but what a differences in speed.
  • Wow! Thank you! I dropped mine from 88mb to 60mb, and my horrendous slow mail issues are gone! Mailboxes were taking 3 or 4 MINUTES to open sometimes. Everything is snappy now! Thanks!
  • Sndl
    I get

    "SQL error: database locked"

    Is there some way to force optimization for non-admin accounts?

    Thanks.
  • Will
    OH thank God, when I closed out Mail and reopened my emails appeared and so much more quickly :) hehe, but seriously for those of us not technically astute you might want to add that warning.
  • I feel your pain griff but it worked like a charm for me. Thanks Dan
  • Went from 54M to 39M and it's much faster now, though having trouble with my deleted mail boxes. Thanks for the pointer to the original tip and especially for clarifying it into two easy 1-line commands.
  • Carolyn
    What a difference, many thanks!!!
  • patrick
    Change my size from 46M to 6M - greatly speeded up, thanks !!! Great tip - can't believe how I have been struggling ...
blog comments powered by Disqus