  Context. K-means is a clustering algorithm that has been used to classify
large datasets in astronomical databases. It is an unsupervised method, able to
cope very different types of problems. Aims. We check whether a variant of the
algorithm called single-pass k-means can be used as a fast alternative to the
traditional k-means. Methods. The execution time of the two algorithms are
compared when classifying subsets drawn from the SDSS-DR7 catalog of galaxy
spectra. Results. Single-pass k-means turn out to be between 20 % and 40 %
faster than k-means and provide statistically equivalent classifications. This
conclusion can be scaled up to other larger databases because the execution
time of both algorithms increases linearly with the number of objects.
Conclusions. Single-pass k-means can be safely used as a fast alternative to
k-means.
