Apple’s Mail.app utilizes a SQLite database to manage the mail index. In my case, that’s approaching 10,000 email messages. Constant deleting and moving wreaks havoc over time on this database, resulting in slow-downs and hiccups (or, in the worst case, failure). You can force Mail.app to rebuild its index, resulting in much snappier performance, a reduction in glitches, and a substantial savings in space. Performing this action has caused my mail folder to shrink in size from 780 MB to 363.9 MB.
It’s simple. Make sure Mail.app isn’t running. Open your home folder, navigate to “Library”. Back up the “Mail” folder from there to your desktop by copying it (don’t just move it). Once you performed this backup, open the original “Mail” folder (~/Library/Mail), and delete the “Envelope Index” file. Launch Mail.app, and watch as it imports your message (simplified terminology for reindexing your messages). Once it’s done (man, it’s fast), Mail.app will show you all your messages using a new, zippier, more efficient index.