Use Declare Fetch
- Last Updated: December 13, 2021
- 1 minute read
- DataDirect Connectors
- ODBC
- PostgreSQL 8.0
- Documentation
Attribute
UseDeclareFetch (UDF)
Purpose
Determines whether the driver attempts to return a result set in a single fetch or across multiple fetches. If multiple fetches are used, the size of the fetch is determined by the setting of the Fetch Size (FetchSize) option. For large result sets, retrieving rows in multiple fetches can improve response time and thereby prevent possible timeouts.
Valid Values
0 | 1
Behavior
If set to 0 (Disabled), the driver returns
the complete result set in a single fetch.
If set to 1 (Enabled), the driver returns
the result set in multipe fetches. The maximum number of rows to be returned in a fetch can
be specified using the Fetch Size connection option.
Notes
B6is an alias for the Use Declare Fetch connection option.- The Use Declare Fetch server-side cursor is not supported with:
- SELECT FOR UPDATE queries
- SELECT INTO queries
- Stored procedures
- Batch queries (queries separated with semicolons)
- Keyset cursors
- When Use Declared Fetch is enabled, the Numeric field values are returned in textual format.
- If you enable the Use Declare Fetch option (
UseDeclareFetch=1) when connecting to a Yellowbrick server and attempt to execute a SQL query with aggregate functions, such as count() and groupby(), the driver will return the following error: "Unsupported node for serialization."
Default
0 (Disabled)