The ODBC connector was built so that the machine pulling the data from the Historian would not be overloaded with data. In most instances you may need to make a query using the openquery function. This function will help define the parameters and keep the system from bogging down. Here is an example getting an hourly average for data yesterday using openquery:
select * from openquery(CANARY,
'select * from data
where tag_name like ''Ken.Data Generation.Random%''
and aggregate_interval=''01:00:00''
and aggregate_id=''TimeAverage2''
and time_stamp>=''3/22/2020''
and time_stamp<=''3/23/2020''')
Ken is the machine name, Data Generation is the dataset, Random is the tag name.
Comments
0 comments
Article is closed for comments.