Disable spotlight indexing

Booting into OS X Lion for the first time after install means spotlight reindexing all volumes. Opening Mail also triggers a full email migration to a new mail database format. This made my MacBook Pro pretty unresponsive for a while. Activity Monitor showed very little CPU utilisation, and a reasonable amount of free memory. Disk activity was clearly the culprit.

Time to disable spotlight for a while.

sudo mdutil -a -i off

To turn spotlight back on

sudo mdutil -a -i on

(Source: osxdaily.com)