hussainian Posted January 14, 2010 Share Posted January 14, 2010 Hi!Please explain.One line "One thing I found with reporting was that JasperReports uses the default fetch size of 25 rows for JDBC. " found athttp://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=54133by Shermanand the other "JR reports need to be fully generated before being displayed in a viewer. So the data will be entirely fetched by the time you see the first report page." found at http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=68911&topid=68919by luciancI'm really confused. Link to comment Share on other sites More sharing options...
jerzyt Posted January 15, 2010 Share Posted January 15, 2010 There's no conflict between the two statements you've quoted. You are getting the entire dataset. But as Sherman says, it's coming to you 25 rows at a time. Increasing the fetch size is beneficial if 1) the rows are small, or 2) the latency to the DB server is high. Increasing the fetch size may improve the performance, but only to a certain point. I've used values as large as 1,000 for tiny row sizes (something like 4 ints), but after certain point, it tapers off, and there's no more benefit. 25 is a good compromise.If you want to mess with the fetch size, you should run some benchmarks to prove that you are in fact improving anything.Jerzy Link to comment Share on other sites More sharing options...
lucianc Posted January 15, 2010 Share Posted January 15, 2010 Jerzy's explanation and suggesions are correct.I'll ellaborate my statement:The fetch size value determines the way the records are retrieved from the DB. The fetch size (if set explicitly or used by default by the JDBC driver) specifies how many records to get from the DB in one batch.No matter what the fetch size is, JR needs to retrieve all records from the DB before displaying/exporting the first generated page. That's because you can have elements with delayed evaluation on the first page, e.g. something like Page 1 of 400, and such elements are only generated when the report has ended filling.Regards,Lucian Link to comment Share on other sites More sharing options...
hussainian Posted January 16, 2010 Author Share Posted January 16, 2010 Thanks you very much jerzy and lucian. The thing is crystal clear to me now.Regards.AsadULLAH. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now