Mass spectrometry is a very popular method for protein and peptide identification nowadays. Abundance of data generated in this way grows exponentially every year and although there exist algorithms for interpreting mass spectra, demand for faster and more accurate approaches remains. We propose an approach for preprocessing the protein sequence database based on metric access methods. This approach allows to select only a small set of suitable peptide sequence candidates, which can be then compared with experimental spectra using more sophisticated algorithms. We define logarithmic distance for selecting peptide sequence candidates and also outline possibilities of using the interval query for searching posttranslational modifications. The experimental results show that our approach is comparable in precision with nowadays most widely used public tools and outline possible directions for further resarch.