When measuring static objects with 3D OCT, two opposing trends occur: If the integration time is too short, the measurement is noisy resulting in granulated textures on measured objects. If the integration time is too long, drifts e.g. due to thermal effects or unstable laser sources lead to blurred images. The Allan variance is a scheme to find the optimal integration time in terms of reducing noise without picking up signal drift. A long-term measurement with short integration time of a reference target under realistic conditions is needed to obtain the database for the calculation of the Allan variance. Longer integration times are simulated by taking averages of subsequent samples. The Allan variance being the mean of the squared differences between two consecutive averages is calculated for different integration times. The optimal integration time is achieved for minimal Allan variance. First, the scheme is explained and discussed with simulated data. Then, reference measurements of layers of adhesive tape made with a 3D OCT device are analysed to find the optimal integration time of the device. Finally, the findings are applied to the detection of water inclusions in calcite. With too short integration time the water inclusions appear with a stained surface. With the integration time increased towards the optimal time, the surfaces of the water inclusions get smoother and easier to discriminate from the background. Ready-to-use Octave code for the computation of the Allan variance is provided.