ssaad

Poor performance querying the snapshot for an AF attribute using PI OLEDB Enterprise

Discussion created by ssaad on Jun 5, 2013
Latest reply on Jun 26, 2013 by ssaad

I´m using PI OLEDB Enterprise 2012, PI AF 2012 and PI Server 2012, production environment.

 

I have the following AF structure:

 

4760.af_5F00_structure.jpg

 

Using PI OLEDB Enterprise, I´m querying the snapshot for attribute 'Temperatura 0001', and it´s taking almost 40 seconds:

 

8004.full_5F00_query.jpg

 

(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:

 

3704.query_5F00_id.jpg

 

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:

 

7506.query_5F00_value.jpg

 

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?

 

Thanks,

 

Sergio Saad

 

 

 

 

Outcomes