how to make recordset opening faster


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: how to make recordset opening faster

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    how to make recordset opening faster

    [Originally posted by Liju John]

    iam using a big msaccess table with around
    80 thousand records. when i try to open this
    table using a recordset object, it takes a
    a lot of time (around 10 seconds). how can
    i reduce this time taken without effecting
    the behaviour of the recordset object.
    i want to apply it to both readonly and readwrite
    recordset objects.
    please reply
    thanks
    liju

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:how to make recordset opening faster

    [Originally posted by m.posseth@work]

    do a specific SELECT on the table to retrieve the records you actually need


    specify the fields you need instead of using a * name them individually ( unless you really need them all ) so˙ SELECT Custnr , Custname etc etc etc˙ FROM Invoices WHERE custname like 'bla%'


    make sure you have good indexes on the table the fields in the WHERE clause should be indexed for instance


    improve you performance by using JOINS instead of subquery`s where possible



    for reading data use a firehose cursor




    Another aproach is getting your data asynchroon
    in this way you can fill a datagrid , or do your stuff while the rest of the data is still getting retrieved in the background ( your programm wil have an inmediate response˙ )

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:how to make recordset opening faster

    [Originally posted by Mike Lyons]

    I will second the suggestions by m.posseth.

    Of course, I've worked with Access tables for nearly a decade, and 10 seconds for 80000 rows is not too bad.˙ There will come a point where the bottleneck may be in the system (hard drive speed, available memory, CPU speed, fragmentation).

    Mike

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