SQL_FOR_SET¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
Use this command during LT or GT finds to only fetch a set number of rows. An option is also available for this command to disable the local cash by passing NOCACHE at the end of the command call. Note that if the rowcount is set low, too many round-trips to the server may result, effecting performance significantly. Also, if the rowcount is set too high a large number of records can be pre-fetched and end up not being used by the application. Because of this, the default of 10 rows and a cache will be adequate for most situations.
Syntax
SQL_FOR_SET {FileNumber} MAXROWS {variable} {CACHE/NOCACHE}
Parameter |
Description |
---|---|
FileNumber |
The number of the file |
variable |
The maximum number of rows to retrieve |
CACHE |
fetched rows will be kept at the local cache |
NOCACHE |
fetched rows will not be kept at the local cache |
Example
Open Customer
SQL_FOR_SET Customer MAXROWS 15 CACHE
find gt Customer by Index.1