[RESOLVED] Urgent Advice - recordset.filter vs. new query
Hello guys.
I'm really needing an advice. :confused:
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.
Re: Urgent Advice - recordset.filter vs. new query
Any one know something about recordset.filter?
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]
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.