The knock sensor on the 4th gen Maxima's and I30's is a known weak point. Mine went bad ('97 Maxima), and the symptoms were decreased power and a horrible drop in mileage. They will set a DTC of 0304, but don't trip the check engine light by themselves. I found mine to be bad while pulling codes trying to figure out my bad mileage. Once replaced, the car runs well.
Some people will get a CEL when their knock sensor goes because the ECU will sense another problem. A common problem to show with a knock sensor code is a mis-fire. That will set the CEL, and can confuse a lot of people. They will troubleshoot coils, O2 sensors, etc. But when the knock sensor is replaced, the other "problems" go away.
Mechtech2, I agree that the KS is basically a "microphone", but it is very important to a VQ engine's performance. With a bad KS, the VQ30 is a dog, and mileage is horrible. It's also surprisingly expensive for what it is (~$120), but that is how Nissan can be. And for those of us with normal to large hands, it's a pain to change because it is in the valley underneath the intake.
BTW, VQ30's are designed to run on 91 oct and higher, but 87 can be used. The manual says there will be decreased performance with 87. I wholeheartedly agree. Maybe Nissan really maxed out the timing curves or something, and that is why our knock sensors are so important. That could be consistent with my observations of better mileage with premium fuel compared to regular (Nissan really taking advantage of timing advances). It easily offsets the price difference. And I've been tracking mine in a spreadsheet for many years (about 6 now).
Dave