Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Additional Features to Enhance DataServer Performance : OpenEdge query types
 

OpenEdge query types

The DataServer provides several ways to submit an OpenEdge query to a MS SQL Server data source:
*ABL — This approach applies to the DEFINE QUERY and FOR EACH statements. The DataServer generates SQL for each of these statements. You can use the QUERY-TUNING option to customize the queries that the DataServer passes to ODBC.
*OpenEdge SQL SELECT — This approach applies to the SQL SELECT statement. When you use this statement in an OpenEdge procedure, the DataServer passes the SQL directly to the data source. This can improve performance, especially when counting records, and can also allow you to access certain types of data more effectively, such as aggregates.
*Vendor-specific SQL — This approach applies to RDBMS stored procedures. If you want to use specialized query syntax supported only by Transact-SQL extensions, you can use RUN-STORED-PROC send-sql-statement to send the syntax to MS SQL Server. You might use a stored procedure to include BEGINS as a search criterion; this SQL query can result in better performance. For more information, see RDBMSStored Procedure Details.
Whether your application can take advantage of the strengths of a particular approach depends on the kind of query you are writing and the kind of data you are accessing. Another factor to keep in mind when you decide which technique to use for issuing queries is whether a query is better served by being processed by the client or by the server. ABL queries are processed by the client (except in the cases of most joins); SQL SELECT statements and Transact-SQL extensions are processed by the server.