They are constant on a "per batch" basis, but not on a "per query" basis. ( and in the real code it does check the size of the list to make sure its not 0 ).
The reason for the performance concern is that I may want to enable remote access to the database through SSH. My testing so far has shown this to not be a good method to access the database.
For example, each time a query happens, due to latency in the connection, it could take around 1-2 seconds for the result to come back, regardless of the size of the result. For example, 7 queries might take 14 seconds for a result to come back even with a minimal amount of data in them, but a single query, even with a result 100 times bigger than the 7 would come back in only 1 second.
So, in essence, I need to do 2 things:
First, I need to make sure that I get the most bang for each query possible, to reduce the effect of latency.
Secondly, I need to figure out if there is a better way to connect, to where the latency issue wouldn't be as much of a problem, perhaps caching data and using a worker thread to do the database work, or making some kind of "middleman" server between the database and the client app.
Bookmarks