Does Datagrip query again when I change the page in a result tab? Does it always happen?

I have noticed while using the IDE, that changing the page of a result set, after running a query, seems to take just as long as running the query the first time. I would have asumed all results are stored somewhere for visualization and then just paginated in groups of 500, but I suppose, by the time it's taking, that it's actually running the query again, and just offseting the results to show me a different page. Is this assumption correct?

Does this happen for every page, or is there another limit, so, say, the first 5 or 10 pages are loaded with no need to re-query, and the rest after that require to query again? I'd like to know how far can I change pages without having to worry I'd have to wait several minutes because I triggered the query again.

1 comment
Yuriy Vinogradov

It's depend on database, but basically we use offset to query only 500(or any other configured value) rows from database each time you turn the page.


Please sign in to leave a comment.