Database Tool Window pagination behavior for large result sets
0 reputation · 11 Dec 2025, 22:11 UTC
0 reputation · 11 Dec 2025, 22:11 UTC
PhpStorm manages the retrieval of large datasets through the Database tool window by implementing a fetch limit, controlled by the Page Size setting. This mechanism prevents JVM memory exhaustion by bounding the initial query result set.
When working with datasets that exceed the global page size, the IDE allows for manual increases or the use of the 'Fetch All' command. However, the efficiency of this process depends on whether the underlying driver utilizes server-side cursors or relies on client-side buffering.
There is uncertainty regarding the memory impact when transitioning from paginated views to a full dataset fetch for extremely large tables.
No internal warning threshold exists. PhpStorm does not display a heuristic alert before a Fetch All operation. Memory safety depends entirely on the configured JVM heap (-Xmx) and the JDBC driver's fetchSize behavior.
Pagination differs by driver cursor support. Drivers with server-side cursors (PostgreSQL, SQL Server, Oracle) keep a database cursor open and stream rows on demand. Drivers without server-side cursor support (older MySQL Connector/J, some ODBC bridges) materialize the entire result set in the client JVM before the IDE can page through it.
fetchSize. The toolbar shows the current page and total rows fetched so far.fetchSize (or iterates to the end of the cursor), loading every row into the Swing table model backing the tool window.FETCH n batches; the IDE only holds the current page plus a small prefetch buffer.ResultSet; the JVM heap must accommodate every column of every row simultaneously.jcmd GC.heap_info or VisualVM during step 3. A sharp rise indicates client-side buffering.Fetch All → copy/paste. The dumper streams via the driver and avoids the Swing table model entirely.-Xmx in phpstorm.vmoptions (e.g., -Xmx4g) and prefer a server-side cursor driver.Which JDBC driver (vendor + version) and database product/version are you using? The cursor behavior is driver-specific, and some MySQL/PostgreSQL driver versions toggle server-side cursors via connection properties (e.g., useCursorFetch=true for MySQL Connector/J 8.0+).
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.