Currently, the default sql query does not contain any where conditions. This means that all data will be returned from the server, although Grafana only renders data that are in the selected time period.
It's very easy to implement this time filter. We just need to introduce Grafana's variables feature, which provides the timestamp of currently selected time period. Then inject them into user's query string.
Question
The thing is, should we allow users to disable this?
As far as I know, Grafana's Influxdb datasource do not allow users to disable the automatically generate time filter conditions, while Mysql datasource explicitly providing this as an option select when adding a new condition.
As the frontend of Grafana's only role is to visualizing data, fetching data that are not in the selected time range is totally a waste of performance and bandwidth.
However, is there any scenarios where users must fetch those data that can not be rendered?
General
Currently, the default sql query does not contain any where conditions. This means that all data will be returned from the server, although Grafana only renders data that are in the selected time period.
It's very easy to implement this time filter. We just need to introduce Grafana's
variables
feature, which provides the timestamp of currently selected time period. Then inject them into user's query string.Question
The thing is, should we allow users to disable this?
As far as I know, Grafana's Influxdb datasource do not allow users to disable the automatically generate time filter conditions, while Mysql datasource explicitly providing this as an option select when adding a new condition.
As the frontend of Grafana's only role is to visualizing data, fetching data that are not in the selected time range is totally a waste of performance and bandwidth. However, is there any scenarios where users must fetch those data that can not be rendered?