Semialgebraic range searching, arguably the most general version of range searching, is a fundamental problem in computational geometry. In the problem, we are to preprocess a set of points in ℝ^D such that the subset of points inside a semialgebraic region described by a constant number of polynomial inequalities of degree Δ can be found efficiently.

Relatively recently, several major advances were made on this problem. Using algebraic techniques, "near-linear space" data structures [Agarwal et al., 2013; Matoušek and Patáková, 2015] with almost optimal query time of Q(n) = O(n^{1-1/D+o(1)}) were obtained. For "fast query" data structures (i.e., when Q(n) = n^{o(1)}), it was conjectured that a similar improvement is possible, i.e., it is possible to achieve space S(n) = O(n^{D+o(1)}). The conjecture was refuted very recently by Afshani and Cheng [Afshani and Cheng, 2021]. In the plane, i.e., D = 2, they proved that S(n) = Ω(n^{Δ+1 - o(1)}/Q(n)^{(Δ+3)Δ/2}) which shows Ω(n^{Δ+1-o(1)}) space is needed for Q(n) = n^{o(1)}. While this refutes the conjecture, it still leaves a number of unresolved issues: the lower bound only works in 2D and for fast queries, and neither the exponent of n or Q(n) seem to be tight even for D = 2, as the best known upper bounds have S(n) = O(n^{m+o(1)}/Q(n)^{(m-1)D/(D-1)}) where m = binom(D+Δ,D)-1 = Ω(Δ^D) is the maximum number of parameters to define a monic degree-Δ D-variate polynomial, for any constant dimension D and degree Δ.

In this paper, we resolve two of the issues: we prove a lower bound in D-dimensions, for constant D, and show that when the query time is n^{o(1)}+O(k), the space usage is Ω(n^{m-o(1)}), which almost matches the Õ(n^{m}) upper bound and essentially closes the problem for the fast-query case, as far as the exponent of n is considered in the pointer machine model. When considering the exponent of Q(n), we show that the analysis in [Afshani and Cheng, 2021] is tight for D = 2, by presenting matching upper bounds for uniform random point sets. This shows either the existing upper bounds can be improved or to obtain better lower bounds a new fundamentally different input set needs to be constructed.