Long time to search through Access database


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Long time to search through Access database

  1. #1
    Duane Guest

    Long time to search through Access database


    I have created an application using VB and Access. The database will have
    over 12,000 records to a max of 200,000 records. It seems to take forever
    to search for a given item, eg. make sure there is no duplications in the
    database. Is there anyway to speed up this process?

    I was told to use FoxPro, but I do not have FoxPro. Does the FoxPro provided
    with VB6 have the tools to compact and repair the database?

    please email me at dsnelling@msc.ca

  2. #2
    Aleksandr Guest

    Re: Long time to search through Access database


    "Duane" <dsnelling@msc.ca> wrote:
    >
    >I have created an application using VB and Access. The database will have
    >over 12,000 records to a max of 200,000 records. It seems to take forever
    >to search for a given item, eg. make sure there is no duplications in the
    >database. Is there anyway to speed up this process?
    >
    >I was told to use FoxPro, but I do not have FoxPro. Does the FoxPro provided
    >with VB6 have the tools to compact and repair the database?
    >
    >please email me at dsnelling@msc.ca


    The time used to find a particular record doesn't depends on the database
    exclusively, is your skill in programming too.
    If you use this

    Dim Rst as New ADODB.Recordset

    Rst.Open "SELECT Code, Name FROM Items WHERE Active = 1", Conn
    rst.Find "Code = '" & searchvalue & "'"

    it will take an eternity to complete, assuming you have 200,000 records.

    But if you do the following,

    Dim Rst as New ADODB.Recordset

    Rst.Open "SELECT Code, Name FROM Items WHERE Active = 1 AND Code = '" & searchvalue
    & "'", conn

    Then the record you want will be found in less than a second.

    The most important thing is you programming technics.

    Luck!

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