Historian getting hanged


I have Ignition 7.9 version on Ubuntu Server 16.04LTS with 32GB RAM. It is handling around 1lakh tags. When I want to plot the data (from last 15days data) (max 6 tags) on easy chart, it takes too much time~5min & some times chart becomes red (disconnects from database). When I checked database throughput, it was 150-250 queries/sec. Is it due to the load or any other reason???

And the database is POSTGRESQL,

Which is better Postgresql or MySQL???

Heh. You realize that many people disagree about the answer to this, and have good reasons. (Keep in mind that many people actually use MariaDB – a fork of MySQL – in place of MySQL itself.)
Personally, I always use PostgreSQL if my customer is not providing the database. Note that it always requires adjustment of its config file, postgresql.conf, to take advantage of high-powered servers.
That said, it sounds like you have queries that need optimization. Particularly the addition of appropriate indices on your timestamp columns to allow the DB to skip full table scans for your complex charts. Those indices should already exist for Ignition’s Tag History subsystem, but need to be manually created for transaction groups.
The bottom line is that you need to study the queries that Postgres is running to determine which ones are causing trouble, and why. You can reconfigure Postgres to log all queries so you can see what’s running, then use ‘EXPLAIN’ to study how Postgres is solving them. If you’ve never worked with such tools, you might want to purchase some consulting time from EnterpriseDB, the major commercial sponsor of Postgres.

1 Like