sql.maxResultSetSize
This parameter only applies to Oracle. It has no effect when used with other database types.
liquibase.sql.maxResultSetSize is a parameter that limits the number of rows loaded into memory from a single SQL query to prevent OutOfMemoryError when snapshotting large Oracle databases with extensive stored logic. The default value is 100000.
Uses
When you run snapshot operations against Oracle databases, Liquibase queries system tables such as ALL_OBJECTS, ALL_SOURCE, and ALL_PROCEDURES to retrieve database object metadata. For databases with extensive stored logic, these queries can return large result sets that consume significant memory. This parameter acts as a circuit breaker to prevent Liquibase from running indefinitely or exhausting available memory.
How it works:
During snapshot operations, queries against Oracle system tables are limited to the configured number of rows.
If a query exceeds this limit, Liquibase throws a clear error message suggesting using snapshot filters or increasing the limit.
Query exceeded maximum result set size of 100000 rows.
This limit prevents OutOfMemoryError on large result sets.
Use snapshot filters to reduce scope, or increase liquibase.sql.maxResultSetSize property.
The default value of 100,000 rows provides protection against memory exhaustion for most Oracle environments.
Setting the value to
0disables the limit entirely.
Recommendations
Keep the default value for most Oracle environments. The 100,000 row limit provides good protection against memory issues while accommodating typical database sizes.
Use
--snapshot-filters(recommended) to reduce the scope of data being queried rather than increasing memory consumption.Increase the limit only if you encounter errors like "Query exceeded maximum result set size" during legitimate snapshot operations on very large schemas.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
Global CLI parameter |
|
Liquibase properties file (defaults file) |
|
Liquibase environment variable |
|
For more information, see Working with command parameters.