Data Loading Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am using Databases in my applications, i have a table with an average of 3.5 million records, i am trying to show the search results in a DataGrid from that table, but the results take a very long time to load, it is a very simple search and there are no constraints on the table nor is it a select query from multiple tables.
I am using a Datacommand to read data into a DataAdapter and then filling a DataSet which is used to populate a DataGrid,
Does anyone know a better way to show records in a Datagrid (a little faster), this thing is driving my nuts !

With Regards
Sunny
 
Some thoughts:

-- Find out what is taking so long.

Are you really trying to look at 3.5 million rows in the
grid? If so then you are going to wait a loonnngg time
while .NET copies 3.5 million rows to the DataSet.

However if your search result should be returning a few
hundred rows and it's still taking a long time to load
then you have to determine if the database query is taking
a long time or if the transfer of data from database to
DataSet is taking a long time.

Sooo, figure out where the bottleneck is...

-- If you DO want to look at 3.5 million rows in the grid
then you have issues --> chief among your issues is that
someone is nuts enough to want to look at 3.5 million rows
in a grid...

So if you find yourself in the nutcase scenario then you
have two options:

1) TRY a DataReader, they are faster, but I doubt this
will help with 3.5 million rows...

2) Thread the data grid load. If done properly you will
have a grid that behaves like MS Word or Excel when
opening a large document; the scrollbar will grow while
the load finishes and simultaneously the user will be able
to manipulate the grid. This, however, is not easy to do
since in .NET the DataSet is the unit of synchronization
not the DataTable.

In any event have fun...

--Richard

-----Original Message-----
Hi,
I am using Databases in my applications, i have a table
with an average of 3.5 million records, i am trying to
show the search results in a DataGrid from that table, but
the results take a very long time to load, it is a very
simple search and there are no constraints on the table
nor is it a select query from multiple tables.
I am using a Datacommand to read data into a DataAdapter
and then filling a DataSet which is used to populate a
DataGrid,
Does anyone know a better way to show records in a
Datagrid (a little faster), this thing is driving my nuts !
 
Back
Top