The RDMS$BIND_QG_REC_LIMIT logical name is used to set the query optimizer row number delivery limit. The number of rows delivered during query processing can now be limited by defining the logical name RDMS$BIND_QG_REC_LIMIT and specifying a value of n records. Defining this logical name is useful for any query that returns large quantities of rows and is likely to do large numbers of I/O operations. This limit counts the rows being returned by the query. Note that this value is independent of the number of records read by the application, for example intermediate records for a join, or component records for an aggregate. It is very similar to the LIMIT TO clause in SQL. However, if this limit is exceeded, an error message is returned. This logical name is translated at attach time and supersedes all options specified in the application. The following DCL command is used to define the RDMS$BIND_QG_REC_ LIMIT logical name and set a value of 20 records: $ DEFINE RDMS$BIND_QG_REC_LIMIT 20 In this example, the query optimizer will terminate processing the query after 20 records are returned. See the RDMS$BIND_QG_TIMEOUT help topic at this level for information on how to limit the elapsed time that the query optimizer can spend compiling a query.