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

  • Luca
    Dan, I love you! Really, I want to have sex with you!
    My letargic Mail now is lightspeed fast! Envelope went down from 120M to 58M!! It is like using a new computer!
  • patrick
    Change my size from 46M to 6M - greatly speeded up, thanks !!! Great tip - can't believe how I have been struggling ...
  • Carolyn
    What a difference, many thanks!!!
  • 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.
  • I feel your pain griff but it worked like a charm for me. Thanks Dan
  • 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.
  • Sndl
    I get

    "SQL error: database locked"

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

    Thanks.
  • 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!
  • WOW dropped from 137M to 129M, but what a differences in speed.
  • Danilo
    Excellent! It saved me some 15m a day. Thanks!
  • Griff
    Make that 3 of them
    Brilliant.
    Any idea how to get them back without reloading the entire mailbox from the original server ?
  • Griff
    hmm,
    now 2 of my POP mailboxes have disappeared.
    Thanks for that
  • This worked extremely well for me and will now save me a ton of time previously wasted waiting for mailboxes to load.
  • 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!
  • THANKS! that is so much better. [Sigh.]
  • Bryce
    thanks a lot, seems to have worked
  • 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.
  • Great!!!
    Thanks!!!
  • Tim
    Been meaning to find a solution to my sluggish mail for weeks now. This worked like a dream. Many thanks.
  • Chuck
    Worked great for me. Thanks!
  • Gavin
    thanks for that, lets see if speeds me up, I have THOUSANDS of Mails everywhere...
blog comments powered by Disqus