How to optimize datagrid loading speed

R

Reddy

The sql query for my datagrid returns 100, 000 records. But the datagrid
should display 20 records per page. I am using datagrid paging, but it is
taking too much time for the page to load. Is there any way I can optimize
the speed. Any sample code would be great.

Thanks,

Reddy
 
A

Alvin Bruney

There is no way to optimize the speed. 100k records will take a long time to
load. There is no way around that. What you can do is implement custom
paging and keep going to the database for pages of 20 rows, that way you are
carrying 20 records per trip. Loading 100,000 records is a seriously bad
idea anyway. Memory allocation and deallocation will be a problem causing
your app to recycle.

One approach used by some websites is to have an index at the top of the
page, usually an alphabetized listing. Clicking on a letter gets just the
records for that letter. It's all in an effort to reduce the large number of
records going back and forth.
 
R

Reddy

Thanks Alvin.

In the old ADO we used to optomize it for around 50,000 records. Thought
there might a way around in .NET as well.

Regards,
 
A

Alvin Bruney

what do you mean optimize it for 50,000 records? Maybe I'm over-looking
something. Can you explain how you would do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top