I always wondered what happens behind the scenes when I query my DB through SQL Developer.
Regardless of the size of the table, I always get no more than 50 rows by default. I am allowed to scroll through the results table, and, apparently, it will be somehow lazy to load the rest of the results.
The display of the first 50 results does not seem to depend on the size of the table (at least for simple SELECT * FROM t), so it seems to me that SQL Developer concludes my statement SELECT swith a SELECT * FROM s WHERE rownum <= 50. If this is the case, as I think, it does not appear on the tab Explain Plan.
How does the SQL developer then lazily get the rest of the results if necessary? Does it use some kind of bias? Will it always repeat the request, but instead of taking only lines with rownum <= 50, will it do it for rownum <= 100, 150, etc.? It will certainly be ineffective. But, if this is not so, then he risks getting the wrong set of rows (since the arrangement of the row tables can be changed between them!).
I also assume that by default SQL Developer only actually retrieves the minimum amount of data from the server, i.e. it doesn’t actually extract everything, although it only shows some results. Is that the case?
Can anyone shed some light on this issue?
source
share