The Registry
The computer's registry is a large, complex database that keeps track of all the hardware and software on the machine. It is stored in several hidden files that are continually accessed by Windows whenever any activity takes place, from booting the computer up, through opening and running applications, to printing out a picture, and finally to shutting down the computer.
In fact, one of the major reasons PC's don't boot up properly, or even get the dreaded "Blue Screen of Death" is a corrupted registry.
Since this database is so complicated and important, you would think that Windows would have some tools to keep it healthy and in good working order, but there are no tools built-in to Windows to manage it, only to edit it.
Because of the way the registry is integrated into Windows, and affects all aspects of its operation, it is usually impractical for a regular user to attempt to do much with it. Even IT pros shy away from making major edits there. Any errors in the editing process can result in registry corruption, which might render Windows unable to boot at all. If the damage can't be easily repaired, usually the best course of action is to reinstall windows; either to do a repair installation, or a complete wipe of the hard drive and full reinstall.
When Windows is running, the registry is read, updated and written to as a matter of course. Windows is not that good a housekeeper, however, and does not always clean up after itself when removing entries that are no longer functional. These extra entries can cause access to the registry to slow somewhat, which can cause slowdowns in the overall operation of Windows.
Preventive maintenance of the registry can keep these slowdowns to a minimum, but the frequency of that maintenance does need not be very often. A good interval between maintenance should be from 3 to 6 months or so, depending on how often programs and utilities are installed and removed.
If you like to try out all sorts of new programs, the frequency at which you maintain the registry should be more often than if you only run what is installed and don't add any new programs to your machine. Of course Windows updates are being installed all the time, as are other updates (think anti-virus and anti-spyware) so that should enter into the equation, but the 3 to 6 month time frame should be sufficient for most users.
You can also do maintenance when your computer starts behaving differently - slow booting up, programs freezing and shutting down unexpectedly, and other irrational behavior. Of course these symptoms can also indicate a malware infection, so that should be the first thing you check for.
There are lots of programs available on the Internet that CLAIM to "Clean and Defragment" the registry, but most of them are a waste of time and most importantly, money. Keeping the possibilities of registry corruption in mind, there are a couple of tools that can keep the registry in good working condition.
I have found that CCLeaner, a free utility (they also have a paid version that offers support), does an excellent job at inspecting the registry for consistency and make sure that all the entries in there are legitimate, in the correct format, and point to the right places. This program has been around since Windows 98 and has been a reliable utility, updated with each version of Windows. In addition to the registry cleaner, it is capable of cleaning up other parts of the system, such as temporary files, as well.
Another utility, really a suite of utilities, is Glary Utilities. This robust package, also free, performs well and has added functionality.
Registry Tuner, from Lavasoft, is another (paid) powerful registry tool that can scan your registry for errors and fix them automatically. It is safe and easy to use.
All of these programs work well. I have never had any of them break a registry (CAUTION: always back up your registry before changing anything with any of these tools!), and I have also had occasion to use ALL of them to root out nasty issues in the Windows registry. While they are good individually, they are dynamite as a group, when working on a registry that was already corrupted due to other issues.
In preventive mode, i would suggest using one of them on a regular basis, maybe alternating each maintenance period, for full coverage.