473,417 Members | 1,459 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

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
3 2801
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Michael B. | last post by:
I'm still learning C so I've written a simple app which lets you make a contact list (stored as a linked list of structs), write it to a file, and read it back. It works fine, but I notice in my...
2
by: John Smith | last post by:
Hey folks, I'm writing a Windows application which has many forms which have Datagrids on them to display data. These datagrids will not be editable in anyway. They are there to just view the...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
2
by: David C | last post by:
I designed a datagrid with editable server controls such as text boxes, dropdowns in each row. That way, the user does not have to click "Edit" to get the editable controls. And with one save...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
4
by: jaYPee | last post by:
I have already done some code to fill the datagrid. my problem is that the fill method is too slow after executing my code. here is the scenario. i have a parent/child form. all is datagrid....
1
by: Bala | last post by:
Hi, Currently i am loading the file names into datagrid (unbound) from a folder(sub folders too). so for this i am using this below code. but its too slow to loading all the file names. is it...
13
by: Frank Swarbrick | last post by:
IBM has a product for the VSE operating system called the VSAM Redirector. It allows you to use VSAM to access RDBMS tables/views as if they were actual VSAM files. We're doing a comparison right...
2
by: pavanip | last post by:
Hi, I have an application like Optimize System Performance by using Memory speed, cpu speed and Disk speed. How to optimize memory speed,disk optimization and CPU optimization. Please provide me...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.