ADO recordset retrieval speed


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: ADO recordset retrieval speed

Hybrid View

  1. #1
    rkbnair Guest

    ADO recordset retrieval speed


    I have a major problem to display about 20,000 records in vsFlexGrid control
    using an ADO recordset. It takes too much time. I use client side cursor
    and retrieve data NOT as a disconnected recordset.

    Is there any way I can speed up this process?

    If I open server side recordset, will it help in speed?


  2. #2
    Joe \Nuke Me Xemu\ Foster Guest

    Re: ADO recordset retrieval speed

    "rkbnair" <rkan@sol.com> wrote in message <news:3d5309d4$2@10.1.10.29>...

    > I have a major problem to display about 20,000 records in vsFlexGrid control
    > using an ADO recordset. It takes too much time. I use client side cursor
    > and retrieve data NOT as a disconnected recordset.


    Can you get away with using a so-called "firehose cursor"? IIRC,
    they're read-only and forward-only, so this might not work very
    well with grid controls. Do you have to load everything into the
    grid at once, or can you have the grid fire an event whenever it
    needs the data for a row which has just become visible?

    --
    Joe Foster <mailto:jlfoster%40znet.com> On the cans? <http://www.xenu.net/>
    WARNING: I cannot be held responsible for the above They're coming to
    because my cats have apparently learned to type. take me away, ha ha!



  3. #3
    Steve Guest

    Re: ADO recordset retrieval speed


    A simple way to test this is open the recordset but don't load it into the
    grid. You'll probably find that your bottleneck isn't ADO, but rather the
    population of all of the rows into the grid.

    There are several tricks that you can use to get a lot of performance out
    of solutions like this. First, how many records can your users read at any
    given time? 20, 30? How long does it take to populate 20-30 rows, a blink
    of the eye compared to 20k. One solution is to only load a visible grid,
    then use a seperate scroll bar based on the recordcount and current visible
    "top" record indicator then refresh the visible records.

    Other tricks include things like "freezing" GUI updates while grids load,
    using methods to load entire rows at a time rather than cells. These things
    usually depend on the grid control you are using.

    Steve.

    "rkbnair" <rkan@sol.com> wrote:
    >
    >I have a major problem to display about 20,000 records in vsFlexGrid control
    >using an ADO recordset. It takes too much time. I use client side cursor
    >and retrieve data NOT as a disconnected recordset.
    >
    >Is there any way I can speed up this process?
    >
    >If I open server side recordset, will it help in speed?
    >



  4. #4
    Chris Hylton Guest

    Re: ADO recordset retrieval speed


    How are you loading the grid...I haven't found 20000 rows to be a problem
    unless you are looping the recordset to load the grid...if you bind the recordset
    directly or convert it to an array using rs.GetRows you might find it to
    be WAY faster.

    I'm not familiar with the grid you posted about, but I know most newer grids
    support ADO recordsets and direct binding of the recordset. Something like
    ComponentOne's truedbgrid also supports an array object as the data source
    (or their XArrayDB object, array on steroids).

    Have you already tried any of these solutions (binding) ?

    Chris

    "rkbnair" <rkan@sol.com> wrote:
    >
    >I have a major problem to display about 20,000 records in vsFlexGrid control
    >using an ADO recordset. It takes too much time. I use client side cursor
    >and retrieve data NOT as a disconnected recordset.
    >
    >Is there any way I can speed up this process?
    >
    >If I open server side recordset, will it help in speed?
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center