I have a ccess db in \\server\dirserver\ddd.mdb
I use ado jet and vb6 to execute sql query via code.
Naturally before to run i test the same query on directlly on the databse and save that.
Wath is the difference in order of time execution to call the query directlly on the remote dabtabase for example:
on the remote databse
.open, "my_sql_query_on_database"...
or via vb6 code
sql="select...."
set rs=conn.execute sql
speed up... execute query in remote
-
- PlatinumLounger
- Posts: 4368
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78589
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: speed up... execute query in remote
It depends on the complexity of the query. When a stored (saved) query is first executed, Access analyzes the query and optimizes it, so that it (theoretically) runs faster the next time.
When you execute an SQL string, Access has to evaluate it each time, so it cannot optimize it.
You won't notice any difference in small databases and with simple queries. But in a large database and with a complex query, running a stored query should be faster than executing an SQL string.
When you execute an SQL string, Access has to evaluate it each time, so it cannot optimize it.
You won't notice any difference in small databases and with simple queries. But in a large database and with a complex query, running a stored query should be faster than executing an SQL string.
Best wishes,
Hans
Hans