skip to main content
OpenAccess SDK SQL engine and IP interaction : Steps for query processing without optimization
 

Steps for query processing without optimization

1. The query is received by the OpenAccess SDK SQL engine and parsed into an expression tree.
2. From the SQL statement, the type of query is determined (SELECT in this case) and the execute function registered by the IP to implement the query execution is called with the type of query set to SELECT.
3. The IP steps through each of the rows in the database and builds rows in the OpenAccess SDK SQL engine that match the definition of a row for the CURVALUE table. Each row is evaluated against the WHERE expression of the query by calling a function in the OpenAccess SDK SQL engine.
4. If the expression is true for the given row of data then it is added to the result set by calling a function in the OpenAccess SDK SQL engine.
5. Steps 3 and 4 are repeated until all rows in the database have been read.
6. The OpenAccess SDK SQL engine packages up the results set and sends it to the client.
Notes to consider about this approach:
All rows of the database are read by the IP even for queries that specify the NAME values in the WHERE clause.
All queries take approximately the same time and this is directly proportional to the size of the database.
The IP never sees the SQL query or the expression tree generated from the SQL statement.