mathiak

PI SQL RQTP - Question for optimization (NOOB user)

Discussion created by mathiak on Aug 19, 2020

I have an user who needs data from start of the year to * now. This data will be used in Tableau for further exploration and analysis. 

 

Data needed : Sampled values every 10 minutes for 30 PI tags.

Data Interval : 10 mins ( Time Step )

Start Time     : Year start 

End Time      : Current Timestamp ( * )

 

Note : User will refresh the data every day but needs the information from year start to (*) now current refresh time. 

 

I have successfully created a Template-Specific Data Model using PI SQL Commander.


Question: 

Each time when we refresh the query the data from Year start to previous data refresh remains the same, just that the previous refresh to current timestamp needs to be updated every time.

   1)How can we optimize this view so that it only refreshes the updates? 

   2)Is it the optimal or the correct way to do it? (i.e Extracting the data from Year start to now everytime)

   3)Or can we create 2 queries of the same template one which extracts the data from Timestamp A to Timestamp B and the other which refreshes from Timestamp B to (*) Current Timestamp.

 

 

Thanks in advance

Outcomes