akenyon

OLEDB Enterprise Data.Archive query performance

Discussion created by akenyon on May 27, 2014
Latest reply on May 28, 2014 by michaelh

I'm using Microsoft SQL Server Management Studio and the PI OLEDB Enterprise provider to query AF/PI Data. I seem to have huge performance issues depending on which tables I query. If I query Operations.Asset.ElementAttribute the query is lightning fast in both PI SQL Commander and in SQL Server Management. If I query from the Operations.Data.Archive using PI SQL Commander the query will grab 1854 rows under a second while if I query using SQL Server Management the query takes 120 seconds. The Query I'm using is as follows:

 
SELECT * FROM GasOperations.Data.Archive WHERE ElementAttributeID = '00000000-0000-0000-99b7-000000000000' AND TIME >= '05-20-2014'

 Is this a configuration issue using the PI OLEDB Enterprise provider as a linked server? or do I need to adjust the query when using SQL Server Management?

Outcomes