docs: private Pair<KNNQuery<O>, KNNQuery<O>> getKNNQueries(Database database, Relation<O> relation, StepProgress stepprog) {
      DistanceQuery<O> distQ = database.getDistanceQuery(relation, reachabilityDistanceFunction, DatabaseQuery.HINT_HEAVY_USE);
      // "HEAVY" flag for knnReach since it is used more than once
      KNNQuery<O> knnReach = database.getKNNQuery(distQ, kreach, DatabaseQuery.HINT_HEAVY_USE, DatabaseQuery.HINT_OPTIMIZED_ONLY, DatabaseQuery.HINT_NO_CACHE);
      // No optimized kNN query - use a preprocessor!
      if(!(knnReach instanceof PreprocessorKNNQuery)) {
        if(stepprog != null) {
          if(referenceDistanceFunction.equals(reachabilityDistanceFunction)) {
            stepprog.beginStep(1, "Materializing neighborhoods w.r.t. reference neighborhood distance function.", LOG);
          }
          else {
            stepprog.beginStep(1, "Not materializing neighborhoods w.r.t. reference neighborhood distance function, but materializing neighborhoods w.r.t. reachability distance function.", LOG);
          }
        }
        int kpreproc = (referenceDistanceFunction.equals(reachabilityDistanceFunction)) ? Math.max(kreach, krefer) : kreach;
        knnReach = DatabaseUtil.precomputedKNNQuery(database, relation, reachabilityDistanceFunction, kpreproc);
      }
  
      // knnReach is only used once
      KNNQuery<O> knnRefer;
      if(referenceDistanceFunction == reachabilityDistanceFunction || referenceDistanceFunction.equals(reachabilityDistanceFunction)) {
        knnRefer = knnReach;
      }
      else {
        // do not materialize the first neighborhood, since it is used only once
        knnRefer = QueryUtil.getKNNQuery(relation, referenceDistanceFunction, krefer);
      }
  
      return new Pair<>(knnRefer, knnReach);
    }