The setup and first results from commissioning of a fast online photon energy spectrometer for the vacuum ultraviolet free electron laser at Hamburg (FLASH) at DESY are presented. With the use of the latest advances in detector development, the presented spectrometer reaches readout frequencies up to 1 MHz. In this paper, we demonstrate the ability to record online photon energy spectra on a shot-to-shot base in the multi-bunch mode of FLASH. Clearly resolved shifts in the mean wavelength over the pulse train as well as shot-to-shot wavelength fluctuations arising from the statistical nature of the photon generating self-amplified spontaneous emission process have been observed. In addition to an online tool for beam calibration and photon diagnostics, the spectrometer enables the determination and selection of spectral data taken with a transparent experiment up front over the photon energy of every shot. This leads to higher spectral resolutions without the loss of efficiency or photon flux by using single-bunch mode or monochromators.