Dear experts,
I am developing a web app, with a large Oracle database.
My customer need a function to download all records
(about a million) to their machine.
My solution is:
1. execute sql to get a chunk of 50 records
2. write to file
3. go to step 1, until all data is downloaded.
This works fine with small database. But it spends an hours to deal with a large database (over 500K records).
Please give me some advice.
Thanks
Regards,
-
Really need a solution to deal with LARGE data (5 messages)
- Posted by: Khanh Tran
- Posted on: March 11 2005 02:23 EST
Threaded Messages (5)
- Really need a solution to deal with LARGE data by Matan Amir on March 12 2005 10:25 EST
- Really need a solution to deal with LARGE data by Hanuman Gahlot on March 12 2005 23:23 EST
- Really need a solution to deal with LARGE data by javier castanon on March 14 2005 19:08 EST
- Really need a solution to deal with LARGE data by Duncan Mills on March 21 2005 07:02 EST
- Really need a solution to deal with LARGE data by Matan Amir on March 23 2005 09:07 EST
- Really need a solution to deal with LARGE data by Duncan Mills on March 21 2005 07:02 EST
-
Really need a solution to deal with LARGE data[ Go to top ]
- Posted by: Matan Amir
- Posted on: March 12 2005 10:25 EST
- in response to Khanh Tran
Hi Khanh,
More information would be useful like:
1. What is your current solution? (JDBC? ORM?)
2. What is taking the most time in the hours it spends? (The SQL, the iteration of results, the writing to the file, etc.)
3. How are you limiting the results to 50? On the DB or your code?
All these will help give a direction on what the best solution is.
Matan -
Really need a solution to deal with LARGE data[ Go to top ]
- Posted by: Hanuman Gahlot
- Posted on: March 12 2005 23:23 EST
- in response to Khanh Tran
Thread to fetch and a single Writer Manager to write in file.
Fire a parallel thread on the database with different "where" clause in database or for fixed defined condition.After the thread fetch the collection of record , the collection is passed to central writer manager which write the data to file.
Best Regards,
Hanuman -
Really need a solution to deal with LARGE data[ Go to top ]
- Posted by: javier castanon
- Posted on: March 14 2005 19:08 EST
- in response to Khanh Tran
I'd like to point out the need of open juat one trasaction, since the data could be changed while you're fetching thousands of records.
Javier -
Really need a solution to deal with LARGE data[ Go to top ]
- Posted by: Duncan Mills
- Posted on: March 21 2005 07:02 EST
- in response to javier castanon
If the amount of data is that large, then is it really suitable for a realtime activity?
I think I'd use the intial page to kick off a job on the server to dump the data, and only when it's finished would I attempt to pull the file, rather than trying to pull batches of rows.
Ideally you'd do all this as close to the Database as possible, then the slow bit (pulling the data across the network) can be done once the transactional bit is done.
Just a thought, maybe this is a good use for XMLHttpRequest to poll for the completed job in the background? -
Really need a solution to deal with LARGE data[ Go to top ]
- Posted by: Matan Amir
- Posted on: March 23 2005 09:07 EST
- in response to Duncan Mills
I'd also like to point out that tranferring that much information over the network to a client machine seems questionable.
In addition, having such a large transaction running on a DB for so long usually would kill the transaction snapshot - unless it was huge.