docs: public static <O> KNNQuery<O> precomputedKNNQuery(Database database, Relation<O> relation, DistanceQuery<O> dq, int k) {
      // "HEAVY" flag for knn query since it is used more than once
      KNNQuery<O> knnq = database.getKNNQuery(dq, k, DatabaseQuery.HINT_HEAVY_USE, DatabaseQuery.HINT_OPTIMIZED_ONLY);
      // No optimized kNN query - use a preprocessor!
      if(knnq instanceof PreprocessorKNNQuery) {
        return knnq;
      }
      MaterializeKNNPreprocessor<O> preproc = new MaterializeKNNPreprocessor<>(relation, dq.getDistanceFunction(), k);
      preproc.initialize();
      // TODO: attach weakly persistent to the relation?
      return preproc.getKNNQuery(dq, k);
    }