Windows Update Database Error Hogging CPU

My CPU was at 30-40% utilization at idle, and the culprit was a process called "Service Host: Local System." After troubleshooting windows update, the following errors are found and fixed:
This fixes the problem, but it is only temporary. The problem returns after a few hours. How can I prevent this database error from affecting my system?