(in theory a user could run a 'SELECT * FROM Table' and return EVERYTHING!!!).
SCJP1.4
Originally posted by Mark Spritzler:
Well, if you are in a container, Hibernate will use the Connection pool implementation of the container. C3PO is used when you are running Hibernate outside of a container.
Also, like Paul said, you can set the max result set/pagination settings for the number of records retreived at a time. I know that there isn't a single user that can look at 5 million records at once anyway, so your design of your UI, regardless of Hibernate, will have to take that into account.
You really do want Hibernate to do some sort of pagination for records, because with Hibernate or JDBC 5 million record objects either in a ResultSet or you Java Objects will be a lot of memory, and I doubt you servers will be able to handle that without running out of memory.
So I highly recommend you go to your architect/designer/requirements gatherer, and ask them why it makes sense to let a user query 5 million records at once when they won't even be able to read all 5 million records in one day or one week, I doubt in their lifetime.
Mark
Originally posted by Keith S:
I have been looking at the 'searching 5 million records' thing and I'm not actually gonna perform a search on 5 million results, instead I'm going for a 'summary' table. See all the records are of people, each person is in a region, in a country, on a continent.
So i was thinking of a summary table that displays the number of people for each (continent, country, region) then if you click on a continent you get all the countries there, click on a country you get the region click the region you get the people (these will be SQL queries)!
This way I think the biggest search performed would be for all people in Europe (about 1.5m) still big (and very unlikely) but do-able.
As I say, I have to allow for what could happen rather than what I'd expect to happen.
This seems like the best solution.
As for the Connection Pooling, C3P0 looks like the more commonly used.
Originally posted by Keith S:
I have been looking at the 'searching 5 million records' thing and I'm not actually gonna perform a search on 5 million results, instead I'm going for a 'summary' table. See all the records are of people, each person is in a region, in a country, on a continent.
So i was thinking of a summary table that displays the number of people for each (continent, country, region) then if you click on a continent you get all the countries there, click on a country you get the region click the region you get the people (these will be SQL queries)!
This way I think the biggest search performed would be for all people in Europe (about 1.5m) still big (and very unlikely) but do-able.
As I say, I have to allow for what could happen rather than what I'd expect to happen.
This seems like the best solution.
As for the Connection Pooling, C3P0 looks like the more commonly used.
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|