Gives the JDBC driver used to read data a hint as to the number of rows that should be fetched from the database when more rows are needed. If this number is too low, the number of network round trips needed to retieve the data increases. If the fetch size is too large, you may encounter memory issues.

Syntax

/*+ FORCE_FETCHSIZE(NumberOfRows) */

Arguments

  • NumberOfRows: A numeric of type BIGINT which specifies the forced rowcount. This number should be greater than or equal to zero.

Hint Placement

Generally after the first statement keyword, e.g.:

SELECT /*+ FORCE_FETCHSIZE(1000) */ id, name FROM table1 ;

COMPARE /*+ FORCE_FETCHSIZE(1000) */ target TO source ;

DATACOPY /*+ FORCE_FETCHSIZE(1000) */ source TO target ;
``
FORCE FETCHSIZE can also be used after JOIN

```sql
SELECT a.id, b.name
  FROM table1 a
  JOIN /*+ FORCE_FETCHSIZE(1000) */ table2 b
    ON b.id = a.id ;

See Also