I´m using PI OLEDB Enterprise 2012, PI AF 2012 and PI Server 2012, production environment.
I have the following AF structure:
Using PI OLEDB Enterprise, I´m querying the snapshot for attribute 'Temperatura 0001', and it´s taking almost 40 seconds:
(NOTE: The query above is based on the predefined query for the Snapshot table available in PI SQL Commander.)
At first I thought this delay was due to the INNER JOINS, so I changed the query in order to return just the Attribute ID:
It took almost 23 seconds to execute. Then I copied the returned ID and pasted on this other query, which returns the snapshot based directly on the Attribute ID, without performing any INNER JOINS:
And for my complete disappointment, it took 19+ seconds!
Is this supposed to be THIS slow?? Or am I doing anything wrong in terms of optimization in the query and/or AF structure and/or SQL Server and/or other component of the environment?