Steps to reproduce:
- Create dashboard in any template assigned to host
- Add widget with simple text and select one item, which have long history
- Save dashboard and open it for view.
- Slow loading of widgets
- Massive consumption of memory and CPU by PostgreSQL
Example of failing query:
After quick and dirty hack
the page loads much faster and resource consumption is normal.
SQL query is:
The problem is possible similar to Latest data recent problems.