Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2007

Tip: Looking for answers? Try searching our database.

how many records to load with pagination

Thread view: 
3rdshiftcoder - 28 Jan 2007 06:02 GMT
hi-

i have records stored in a vector.  they are loaded into a jface table
viewer that has an image in the table.  i want to make it so my
scroll bar control controls pagination of the records (objects)
in the db.  how many records would you load into the table
at once before you had them increment to the next results?
there are 8 regular size fields in the table.  it is a check
register table.

is 1,000 ok or should i make it lower?  i dont want the user to keep having
to
paginate and get angry with me but if 1,000 is too much
i'd like to know.

i am using hibernates pagination feature.

thanks very much for your advice,
jim
3rdshiftcoder - 28 Jan 2007 07:37 GMT
i will just try 250 and see how that goes.
i looked around but didnt see any guidelines.
maybe i will just try and adjust if needed.

thanks,
jim
David Harper - 28 Jan 2007 14:05 GMT
> i have records stored in a vector.  they are loaded into a jface table
> viewer that has an image in the table.  i want to make it so my
[quoted text clipped - 10 lines]
>
> i am using hibernates pagination feature.

The number of records you should cache will depend on how much memory
you want your application to use.  If each row contains an image, you
could end up using quite a lot of memory to cache 1000 rows.

On the other hand, loading 1000 images from a database (as blobs,
presumably?) will also take time, and your UI needs to remain responsive.

One solution would be to have a separate thread whose job is to manage
the JDBC connection and fetch data to keep the cache up to date.

However, I don't use Hibernate so I don't know whether it offers you
that level of control.

David Harper
Cambridge, England
3rdshiftcoder - 28 Jan 2007 19:11 GMT
thanks david.

i like your idea about the thread if it becomes unresponsive.
i will try less records and a separate thread if needed.

thanks for repying,
jim

> The number of records you should cache will depend on how much memory you
> want your application to use.  If each row contains an image, you could
[quoted text clipped - 11 lines]
> David Harper
> Cambridge, England


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.