I am using a MySQL database in which the table contains 1.7 million records. Through the Restlet platform in Java, I want to get these records and return them to the client. I am using Linux Centos, which is a remote server. I created a WAR file and uploaded to the server. When I start the service, it takes a long time to respond. I waited 40 minutes, but did not receive any information. So can someone help me solve this problem?
When I have a very large number of lines, I used memory mapped files. for example, I have one database where I have to get and process 1.1 billion rows per minute. (Over 200 GB)
, , SQL NoSQL, , . , 1,7 , , (, TB, )
, .
BTW: . , , . , -, , , .
, : , , , ( , ?).
- , , - , , , . , Restlet : , , .
I have successfully done this kind of work in my applications. If your client is ready to accept a great response, there is nothing wrong with this approach. The main thing is that you will need to pass the answer, which means that you cannot build the whole answer as a string. Get the output stream of the HTTP response and write down the records one by one. On the db-end, you need to configure a scrollable result set (easy to do at the JDBC level as well as at the Hibernate level).