WebStorm DataGrip page-size limit versus PostgreSQL fetch-size streaming
0 reputation · 08 Dec 2023, 15:35 UTC
WebStorm's bundled Database Tools (DataGrip engine) presents query results in a table grid bounded by a per-data-source page-size setting under Database Tools | Data Views, commonly defaulting to approximately 500 rows. Grid pagination functions as a client-side window over fetched rows; the IDE does not automatically inject LIMIT/OFFSET into the issued SELECT statement, so explicit server-side pagination predicates remain the developer's responsibility for bounding work on the database server. A per-data-source JDBC fetch size controls how many rows the driver pulls per round trip; for PostgreSQL, cursor-based streaming is only effective with autocommit disabled and a positive fetch size, otherwise the driver may buffer the entire result set in client memory. The unresolved behavior concerns whether navigating to the next page re-executes the original query or continues fetching from an open cursor, an outcome dependent on driver implementation and IDE cursor state. This question matters for profiling large-dataset queries and deciding whether to rely on IDE pagination or implement application-level keyset pagination.
Does grid pagination re-issue the SELECT statement, or does it advance an existing cursor? How does the page-size setting interact with the JDBC fetch size when autocommit is enabled? Can the observed paging behavior be predicted from driver and IDE configuration alone?