tdanderson77

Large SQL data call

Discussion created by tdanderson77 on Aug 12, 2015
Latest reply on Aug 12, 2015 by pthivierge

How do I write a SQL query to retrieve (4500 PI tags) along with pulling every second of a day (86,400) 4,500 X 86,400 = 388,800,000 rows in one query. Here is what I am trying use currently. Can someone please help?

 

SELECT tag, time, value

 

FROM piarchive.piinterp2

 

WHERE time between

 

'8-feb-15 13:30:00'

 

and '8-feb-15 14:00:00'

 

and timestep='1m'

 

and tag like 'U3%'

Outcomes