java - Paging With a Cartesian Product -
Please add this comment if more information is needed to answer this question.
We have a query that gives a cartesian product since there are so many results, so there are probably one ton objects which are hydrated. We want to do simple paging on the database end, so it is fast, and so it only starts on the line n * page, where n says, 100.
In the problem we are running It is that the query is being done on a different
so that it can return the required rows but, it ends filtering results so that you get less than 100.
For this reason, although we have a page number, we would not know that to start or stop without querying the initial point of view (i can not use rownum) And until we get 100 results, maybe looping, you get this idea. mess it up.
If necessary, we can do SQL directly, but there is not an option like table refracting.
In any way, I can not imagine that we have to face the situation anytime before, so I want to know that there is no way to do this.
Thanks in advance!
Edit: @ Nicholas 78 posted a comment that actually describes the situation.
You will need to put the search in the query so that it first Points have been applied. For example: Choose deptno (deptno) from RODE, choose ROOM as a RON (choose a separate depot from the order of the order by DipTOn) where rownum & lt ;: pagenum * 100) RNA & gt; (: Pagenum-1) * 100;
Comments
Post a Comment