Quote Originally Posted by chuckatkinson View Post
At the end of the day you are trying to access a database and table across a WAN. Unless you have a 1GB internet connection it's going to be slow as molasses. Even with 1GB it won't be that fast.
Well, it depends. If you access the DB over WAN and got a really good latency (1-2 ms) it would probably still be fast with slower connections like 50-100 Mbit/s.
A higher latency like 90ms can still be okay if you only make few queries.
If you make a loop and open and close and reopen and close a connection 1000 times, it will be slow.
Proccessing large sets of records with the filebuffer oder DataDictionaries will be slow as well.

So in order to optimize the speed, you can:
- reduce the latency (if possible)
- reduce the number of connections you are opening and closing, preferably just use one connection and keep it open as long as needed
- bundle multiple single queries into larger ones and execute them together.