Which Page Size setting prevents JVM heap exhaustion for massive result sets?
26K reputation · 11 Sept 2021, 01:38 UTC
When executing queries against tables with millions of rows in PhpStorm, the IDE manages memory by implementing a client-side boundary on the retrieved data. This is primarily controlled through the Page Size configuration within the Data Source properties.
While this mechanism prevents the IDE from attempting to load the entire dataset into memory at once, the actual behavior depends on the interaction between the JDBC driver and the IDE's internal result set viewer. There is a potential conflict between the SQL LIMIT clause and the IDE's internal pagination settings when optimizing for JVM heap stability.
Does the Page Size setting strictly override the SQL LIMIT clause during the initial fetch, or do they operate as independent filters? Additionally, how does the IDE handle memory allocation when the Page Size is set higher than the available JVM heap space?