This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
OS : widows 2003 Server
RAM : 4 GB
Oracle9i Enterprise Edition Release 126.96.36.199.0 - Production
PL/SQL Release 188.8.131.52.0 - Production
CORE 184.108.40.206.0 Production
TNS for 32-bit Windows: Version 220.127.116.11.0 - Production
NLSRTL Version 18.104.22.168.0 - Production
For my web application I want to fetch all the rows from product table to generate invoice.
I want to take all the records on client side and then add one row at a time
My query does not take time if I run it on SQL (get the output within second).
But In my web application I have following steps:
1. Run the query
2. Populate product object(s) for 10K rows in loop
3. After that JSP page is displayed by using <logic:iterate> Tag
This whole process takes 1 min 55 sec(s), around 2 min(s). This time is too long if user is waiting for a form to get displayed.
Is there any other way to populate product object directly from query? Query I tried:
SELECT PRO_ID, NVL(PRO_CODE,'') As PRO_CODE,
NVL(PRO_DESC, '') AS PRO_DESC,
NVL(PUR_PRICE, '') AS PUR_PRICE,
NVL(SALE_PRICE, '') AS SALE_PRICE,
NVL(CRNCY, '') AS CRNCY
FROM PRO p ORDER BY PRO_CODE,PRO_DESC ;
I can't believe that you need to display 10,000 products on one invoice (I should have such a customer) so presumably you actually only need a few of them for each invoice. The solution is to select, using SQL, only those products needed for each particular invoice.
There is a another reason for not loading all the products every time you want to create an invoice. In the Servlet and JSP world memory is a scarce resource so what would happen if say a hundred or more of your customer all want an invoice at about the same time?
Joined: Oct 14, 2011
So your users are going to be able to scroll through 10,000 records. How long before they get bored ?
Bored, nothing. After the first hundred or so rows, my eyeballs begin to bleed.
Then there's the network overhead. A page that size will take forever to download. People will start screaming if they accidentally hit a button that causes a redisplay. Some browsers might crash, and the RAM usage on the server will go through the roof.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Oct 14, 2011
I am also planning for Ajax, because if I take 10 K records in memory system will go very very slow.
But never worked with Ajax.
Any one can give link for Ajax as per my requirement
versha Ag wrote:I just want to input the product code and retrieve the record from database.
So have you abandoned the requirement for the user to scroll though all 10,000 products? As you are aware, fetching one product at a time via product code requires a way to select the product. Using a dirty great list or even a paged list of 10,000 items is going to be clumsy at best. One normally needs some for of search engine that will allow the user to type in a search criteria and then get a list of those products that match the criteria. This way only a limited amount of scrolling is required.
The search engine can be quite simple consisting of a set of drop down lists. Starting with a primary list one select from than and a sub-list is displayed (this is where Ajax comes in). This process can be repeated several times to home in on the desired product.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com