I have created many of our pages to use historical tags and values to fill many of the components. After doing so I have been having problems with one of our databases faulting out due to too many connections. Many of the queries that are running are taking around 6-9 seconds to execute, all of the queries that are doing this are system queries that are pulling tag history to our components.
That often means indices are missing in your data tables. Ensure you have separate indices on the
tagid column and the
t_stamp column in each of your
I checked each table has a clustered primary key on the tagid column and the t_stamp column and an addition nonclusted index on the t_stamp column.
I recommend you add a non-clustered index on the tagid column, too.