DataGrip Data Editor pagination rewrite with existing LIMIT clause
25K reputation · 22 Sept 2025, 20:33 UTC
DataGrip Data Editor supports bounding result sets through a configurable maximum rows to fetch and a per-query limit override, and provides First/Prev/Next/Last navigation with a selectable page size in the result grid. For databases with native LIMIT/OFFSET support, pagination can be implemented by rewriting the query on execution. Fetch size is configurable per data source and controls how many rows the JDBC driver streams per round-trip.
Uncertainty
Behavior is version sensitive and varies by DataGrip release and database dialect. The interaction between a user-written LIMIT or equivalent and DataGrip's automatic bounding is dialect dependent, and pagination may operate server-side for some dialects and client-side for others. Automatic LIMIT injection can affect semantics for queries using window functions, CTEs or complex joins.
What is the documented combination rule when a query already contains a LIMIT and DataGrip applies its own row limit for a specific dialect? Under which conditions does pagination use server-side query rewrite versus client-side fetching? Is fetch size independent of the Data Editor row limit setting?