Progress
DataServer for
Microsoft SQL Server
Guide
Progress Query Types
The DataServer provides several ways to submit a Progress query to an MSS data source:
- Progress 4GL — 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.
- Progress 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 Transact-SQL extensions, you can use RUN–STORED–PROC send–sql–statement to send the syntax to 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 the "Sending SQL Statements Directly to the Data Source" section.
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. Progress 4GL 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.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |