AutoQuery

<< Click to Display Table of Contents >>

 

AutoQuery

Boolean When this property is set to True, this is called an AutoQuery-type of Pen. The goal of this type of Pen is to save memory consumption and query time. To do so, it applies filters in the E3Timestamp field to retrieve only data needed to E3Chart's area. Every time an E3Chart's visible period changes, an AutoQuery-type of Pen retrieves missing data to complete the drawing of that period. In addition, an AutoQuery-type of Pen also completes missing historical data to connect a Pen's historical and real time parts. If, for any reason, historical data is not retrieved after thirty seconds, an Automatic Query is canceled on that part. Please check also the MaxGapTime property for more details.

Due to the way an Automatic Query applies filters to an E3TimeStamp field, this type of Pen is not available for Storage queries or user-defined SQL code, that is, even when the AutoQuery property is set to True, this property has no effect if that Query's type is Storage. One way to recognize an Automatic Query is a hatched drawing on an E3Chart screen. Every time hatches appear on that drawing, this means that on this period an Automatic Query is currently performing. When hatch borders are in red, this means the Automatic Query on that part is failing. In this case, E3Chart re-executes problematic Queries on that part.

 

NOTE

Unlike a real time part, where each Pen contains its own data buffer, a Pen's historical part is stored on the Query and shared among Pens. For example, when a Query contains the E3Timestamp, Field1, and Field2 fields, this data is stored on the Query and it is available for Pens sharing that Query. Thus, the common part, usually the E3Timestamp field, can be used by two different Pens without duplicating data. For AutoQuery-types of Pens, two different Pens can use the same table and, due to different scales, they can load different Query periods. In this situation, each Pen automatically inherits the part loaded by the other Pen.

A Query object cannot work simultaneously in Automatic and Non-Automatic mode. This also means that if different Pens, one Automatic and another one Non-Automatic, want to share the same Query, that Query is going to adapt to the first Pen using it, that is, the AutoQuery property does not ensure that a Query is in Automatic mode, this also depends on other factors.

Was this page useful?