Why limit max-select-series?

I’m interested in configuring my database to fail queries that would use too much memory or other resources or are otherwise infeasible, to reduce the chances that one user can take down the service for others.

I’m curious about the max-select-series parameter: Why would someone set this parameter? Is the number of series read in a query an indicator of how much memory would be used? Is the “series selected” a meaningful number for the “dangerousness” of a query?

Hello @ezquat,
Yes, that’s right! For example to prevent you from querying all the data in your database (this was especially relevant in 1.x where users prone to using queries like "Select * from “mymeasurement” .

Riffing on this a little bit: I really wish I could limit the amount of memory used by a query per se. I know how much memory my machine has, and about how many concurrent queries I’d like to support, so I could set a memory limit that way. With max-select-series and max-select-points, I don’t really know how many bytes a point might be or how many bytes a series might be, so I’m stabbing in the dark to set those parameters.

Here’s a specific question: If a user, say, selects a lot of series over a long time period, then sure, I’d expect that to take a lot of memory. But if they do the same query over a lot of series with a very short time period, I’d expect that to take a lot less memory. I’m assuming that it doesn’t just page in the entire series when the series is touched, but rather it pages-in some small chunk based on the time parameter. Given that intuition, it seems like it doesn’t make sense to limit max-select-series, only max-select-points. Or am I wrong—is there some large amount of minimum memory footprint per series touched?