Results 1 to 4 of 4

Thread: [RESOLVED] Urgent Advice - recordset.filter vs. new query

  1. #1

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Resolved [RESOLVED] Urgent Advice - recordset.filter vs. new query

    Hello guys.
    I'm really needing an advice.

    Question:
    What is faster, use recordset.filter or make a new query with my parameters?

    Example:
    With some calculation, this one here takes me +- 7hours to process 300000 lines

    Pseudo-code from my real code, not tested
    Code:
    '...
    for i=1 to 300000
       rs.Execute "select id, desc from table where id=" & i 
       '...some processing
    next i
    '...
    or

    'I just can't test it, no time for it
    Code:
    '...
    rs.command "select id, desc from table"
    for i = 1 to 300000
       rs.filter = " id  =  "  & i
       '... some processing
    next i
    '...
    Oh, by the way, my db is based on MS Access2000.
    For more details in database querys, please go this is my other thread, trying to resolve this with some Voodoo-SQL:
    http://www.vbforums.com/showthread.php?t=499176

    Without this, the entire process (process 300000 rows) it only takes me +-10minutes.


    Thank you once again for your help.
    Last edited by RS_Arm; Dec 3rd, 2007 at 12:25 PM.

  2. #2

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Urgent Advice - recordset.filter vs. new query

    Any one know something about recordset.filter?

  3. #3

    Re: Urgent Advice - recordset.filter vs. new query

    actually I never test which one more faster. but I think rs.filter is faster, specially if your database is on the network. because rs.filter do the job on client and new query do the job on server and send the answer to client.

    [Advertising link removed by Moderator]
    Last edited by RobDog888; Dec 4th, 2007 at 05:23 AM.

  4. #4

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Urgent Advice - recordset.filter vs. new query

    Using the filter method is really fast, compared with making a new query to the db.
    It reduced from 10 hours of processing to 50minutes, only by modifying about 5 lines of code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width