Try OpenEdge Now
skip to main content
DataServer for Oracle
Additional Features to Enhance DataServer Performance : SQL and ABL queries
 

SQL and ABL queries

The DataServer allows you to use different approaches for querying an Oracle database. Your application might be able to take advantage of the strengths of the different approaches depending on the kind of query you are writing and the kind of data you are accessing. The approaches are:
*ABL — The DataServer generates optimal SQL for DEFINE QUERY and FOR EACH statements, but you can use the QUERY-TUNING option to customize the queries that the DataServer passes to Oracle.
*ABL SQL SELECT — When you use an SQL SELECT statement in an OpenEdge procedure, the DataServer passes the SQL to Oracle. This approach can improve performance, especially when counting records, and allow you to access certain types of data more effectively, such as aggregates.
*OpenEdge SQL-92 — Do not use SQL-92 syntax in applications that access the DataServer. The OpenEdge SQL Engine (which compiles SQL-92) is not integrated into the DataServer architecture.
*Oracle SQL — If you want to use specialized query syntax supported only by SQL, you can use the RUN-STORED-PROC send-sql-statement to send the syntax to Oracle. If you want to use BEGINS as a search criterion, an SQL query can result in better performance. Note, however, that ABL and SQL queries produce different results when accessing CHAR data because ABL uses bind variables. Use the QUERY-TUNING NO-BIND-WHERE option in the ABL query for results that are more similar to results from an SQL query.