How to optimize datagrid loading speed

Discussion in 'ASP .Net' started by Reddy, Jan 19, 2004.

  1. Reddy

    Reddy Guest

    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
     
    Reddy, Jan 19, 2004
    #1
    1. Advertising

  2. Reddy

    Alvin Bruney Guest

    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" <> wrote in message
    news:%...
    > 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
    >
    >
     
    Alvin Bruney, Jan 19, 2004
    #2
    1. Advertising

  3. Reddy

    Reddy Guest

    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:...
    > 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" <> wrote in message
    > news:%...
    > > 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
    > >
    > >

    >
    >
     
    Reddy, Jan 20, 2004
    #3
  4. Reddy

    Alvin Bruney Guest

    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" <> wrote in message
    news:...
    > 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:...
    > > 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" <> wrote in message
    > > news:%...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alvin Bruney, Jan 20, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ham

    I need speed Mr .Net....speed

    Ham, Oct 28, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    2,357
    Antony Baula
    Oct 29, 2004
  2. =?Utf-8?B?U2FjaGk=?=

    Best choice to optimize datagrid paging and sort ??

    =?Utf-8?B?U2FjaGk=?=, Apr 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    453
    Brock Allen
    Apr 21, 2005
  3. efiedler
    Replies:
    1
    Views:
    2,074
    Tim Ward
    Oct 9, 2003
  4. Replies:
    2
    Views:
    2,312
    Howard
    Apr 28, 2004
  5. Replies:
    2
    Views:
    345
    Christopher Benson-Manica
    Apr 28, 2004
Loading...

Share This Page