skip to main content
OpenEdge Data Management: DataServer for ODBC
Programming Considerations : Enhancing DataServer performance : Progress query types
 

Progress query types

The DataServer provides several ways to submit an ABL query to an ODBC data source:
*OpenEdge 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 a Progress 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 stored procedures. If you want to use specialized query syntax supported only by a vendor's SQL extensions, you can use RUN–STORED–PROC send–sql–statement to send the syntax to your ODBC data source. For example, you can use this approach to modify the data definitions of your data source from the OpenEdge client. You might also use a stored procedure to include BEGINS as a search criterion; this SQL query can result in better performance. For more information, see Sending SQL statements directly to the data source.
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 vendor-specific SQL extensions are processed by the server (the ODBC data-source manager).