Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE

> ## SQL and Progress 4GL 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:

> - Progress 4GL — 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.

> - Progress 4GL SQL SELECT — When you use an SQL `SELECT` statement in a Progress 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 Progress 4GL and SQL queries produce different results when accessing `CHAR` data because Progress 4GL uses bind variables. Use the `QUERY-TUNING` `NO-BIND-WHERE` option in the Progress 4GL query for results that are more similar to results from an SQL query.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095