5
Reply

Huge table needs to be loaded

weird_littlegirl

weird_littlegirl

May 18 2004 9:18 AM
2k
I'm implementing a treeview control whose labels are grabbed from a very very large database table. This is going to be an embedded ActiveX control. I don't think it'd be very efficient to get the user to download all the data in the table the first time the control loads, it will take too long. Is it a good idea to grab the data little by little? For example, I have a path like this in my menu: Universe --> Galaxy --> Solar System --> Mercury, Venus, Earth, Mars (Assume there are many galaxies and within each galaxy there are many many solar systems.) So let's say when the control first loads, the top two levels are loaded -- that is, universe and galaxies. When the user clicks on one of the galaxies, the subsequent solar systems from that galaxy will be grabbed from the db table. Is this a good way to load the data? Or is there a better way? And would I store this info in a DataSet object? How do you append new info to the DataSet? I don't think I can overwrite any info because I need to keep the data from the upper layers. Would another option be to grab everything from the table once, store it in a cache somewhere on the server, and then distribute that to all users a little bit at a time? But the problem with this option is that I have no idea how to implement it. Thanks in advance.

Answers (5)