A bad O2 sensor can have a significant effect on gas mileage. Here’s a procedure for checking the O2 sensor. The procedure may be the same for your year.
The following procedure applies to all 1991 and up 240SX models:
1) Turn on ignition switch (do not start engine).
2) Turn diagnostic mode selector on ECU fully clockwise.
3) Wait a few seconds.
4) Turn diagnostic mode selector fully counterclockwise.
5) You are now in MODE-II.
6) Start engine and let fully warm up (temperature up to normal).
7) Run engine at 2000 RPM or higher for about two minutes under no load
8 ) Check that the inspection lamp (red LED) on the ECU goes on and off more than 5 times during 10 seconds at 2000 RPM.
If anyone wants a new O2 sensor, here is the Bosch part numbers:
#11035 = OEM style O2 sensor (w/connector)
#11027 = “universal” O2 sensor (w/o connector)
Basically the universal one is exactly the same as the OEM one except for the fact that you have to cut the connector off your old sensor and attach it to the universal one using the crimpable connector they give you (w/shrink tubing also). In my opinion, for $25 the universal one is a lot better than the $32 OEM one (unless you don’t like cutting and crimping). I got mine from Autozone.