Also check for loose earth connections
The whole fiasco with my wagon today started because I had idle and stalling problems. I started with a cleaning of the battery terminals and the necessary "computer relearn", but found that my main earth connection on the engine block mount was loose and playing voltage havocs. In the process I knocked some wiring and the car would not budge for about 3 hours of head scratching. But after driving for a couple hours this afternoon, she runs a sweet as can be.
So there is another culprit for lousy idling,