Problem Description: A large number of external terminals access the internal UNIX server via the socket, Requires data from the server's Oracle database to be displayed in the terminal processing. The maximum number of sockets required for the socket is 5,000 characters, then for the mass of data required to obtain data and multiple transmission, how to achieve it.
Solution: First consider using rownum, but in Oracle (version 10g), rownum cannot use ">", and after a simple test, found that "order by XXX" combined with rownum query, There is no guarantee that the data in the query is consistent and that the order has changed (why. I think it might be the case that I made the select first and then the order by sort. The truth will be verified later. )。 So consider nested select to solve the problem that rownum cannot use ">". Considering that ROWID is the only sign that identifies the record, use order by rowID Bar, after simple test, the problem seems to be solved. SELECT *
From (
SELECT rownum SN, T. *
From table_name t
ORDER BY ROWID
)
WHERE SN > 5
and SN <= 10
Wait for further testing ...