From 7440266737210c7979178d1747cc3d68594f364f Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Wed, 9 Apr 2025 10:55:27 -0400 Subject: Disabled early abort for point lookups I'm having some trouble getting "bad" query performance, so I'm going to try using PLs w/o early abort as a worst-case scenario. This should get the best per-shard performance scaling --- benchmarks/include/file_util.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'benchmarks/include/file_util.h') diff --git a/benchmarks/include/file_util.h b/benchmarks/include/file_util.h index df8d999..a159dbe 100644 --- a/benchmarks/include/file_util.h +++ b/benchmarks/include/file_util.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "psu-util/progress.h" @@ -73,6 +74,7 @@ static std::vector read_range_queries(std::string &fname, while (fscanf(qf, "%zu%zu%lf\n", &start, &stop, &sel) != EOF) { if (start < stop && std::abs(sel - selectivity) < 0.00001) { QP q; + q.lower_bound = start; q.upper_bound = stop; @@ -84,6 +86,30 @@ static std::vector read_range_queries(std::string &fname, return queries; } +template +static std::vector read_sosd_point_lookups(std::string &fname, size_t n) { + std::vector queries; + + FILE *qf = fopen(fname.c_str(), "r"); + + if (!qf) { + fprintf(stderr, "ERROR: Failed to open file %s\n", fname.c_str()); + exit(EXIT_FAILURE); + } + + size_t start, stop; + double sel; + while (fscanf(qf, "%zu%zu%lf\n", &start, &stop, &sel) != EOF && queries.size() < n) { + QP q; + + q.search_key= start; + queries.push_back(q); + } + fclose(qf); + + return queries; +} + template static std::vector read_binary_knn_queries(std::string fname, size_t k, size_t n) { -- cgit v1.2.3