467,146 Members | 1,308 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

How to optimize datagrid loading speed

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
Nov 18 '05 #1
  • viewed: 2543
Share:
3 Replies
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.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Reddy" <an********@NO.JUNK.MAIL> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #2
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,
"Alvin Bruney" <vapor at steaming post office> wrote in message
news:ed**************@TK2MSFTNGP12.phx.gbl...
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.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Reddy" <an********@NO.JUNK.MAIL> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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


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

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Reddy" <an********@NO.JUNK.MAIL> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
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,
"Alvin Bruney" <vapor at steaming post office> wrote in message
news:ed**************@TK2MSFTNGP12.phx.gbl...
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.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Reddy" <an********@NO.JUNK.MAIL> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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



Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Michael B. | last post: by
2 posts views Thread by John Smith | last post: by
5 posts views Thread by John Richardson | last post: by
2 posts views Thread by David C | last post: by
4 posts views Thread by jaYPee | last post: by
1 post views Thread by Bala | last post: by
13 posts views Thread by Frank Swarbrick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.