aws-samples / aws-samples/aws-iot-fleetwise-evbatterymonitoring
Performance Issue w/ Grafana Timestream Queries After DB Records Exceeds Large Amount
- Dominant language
- Python
- Stars
- 8
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
When testing the Grafana dashboard for the ev battery monitoring demo, I ran into a new issue where Grafana would hang indefinitely when trying to load the provided sample dashboard.
After investigating, I found that the ‘Name of Signal’ variable was using a query which broke once the Timestream data exceeded a large quantity of records (900,000+ in my db).
The original provided variable query was doing a select on all measure_name entries from all time and this was not resolving even when i tried directly in the query editor without timing out.
I was able to fix it by replacing the query with a distinct call instead:
```
SELECT distinct(measure_name) from "FleetWiseDatabase"."FleetWiseTable"
```
Screenshots of the issue/resolution in Grafana:
Before:

After:

Contributor guide
Assessment
This issue has not been assessed yet.