|Without the model/model number of your Compaq, no one can tell you if the CPU will work or not. Your motherboard may not support it.|
You should be investing in more RAM, not a CPU upgrade. "1ghz" (which I assume is 1GB), isn't enough to run Vista decently. And if you're using onboard video, you should consider adding an actual video card.