What is the best practice to reduce (initial) results execution time from the external database?
Hi guys I am using database connector to connect with a Microsoft SQL db. The first (initial) query execution takes much more time then the other following. So when this is also the datasource mf (first call), it takes extra long. I expect due to a "hand shake protocol" or so. I think that after a while this is needed again. So I need to reduce the time for loading (initial/following times) overview of objects. I am wondering whether an other dummy SQL execution as a handshake would help? And what the best practice for that would be (in the after startup? scheduled event? and running the datasource mf's as not the first) Edit 1: quering a version as hand shake in a after startup microflow reduced the initial loading for the overview of the objects. now is the question should I do this as Scheduled Event each 5-1-15 ...minuts?
This handshake you mention includes the client retrieving the database schema and some other metadata from the server. This will typically take long, and is not an issue for most applications.
Your actual problem is that you're not using a proper connection pool that will initiate at application startup and serve existing connections from the pool whenever they are needed.
So if you really want to solve this issue you'd have to implement a connection pool yourself. This requires some Java knowledge to write.
Hi Enzo, depending if the hand-shake is required after some time of inactivity, then you could do a hand-shake call. So you should test this and that should give you the answer :-)