database query concurrency

Is there any solution to make concurrent database query on a database?
What about add this line to ini config?: “-Dknime.database.enable.concurrency=true”
I added above config to my ini file. But it didn’t solve my problem.
I want to run multiple concurrent query with one database connection.

Hi @aminfazeli43 , and welcome to the Knime Community.

You can run query nodes in parallel instead of in series/chained like this:

These queries nodes will run at the same time in parallel, as soon as the db connection is executed.

May be you can elaborate more on what you are trying to do and what’s the purpose of the concurrency. The concurrency will be handled by your db system where chances are that some of the queries will still not run concurrently and will be queued, depending on what they are querying. Also, chances are that you would be taxing your db system unnecessarily, and chances are you may be limited by other factors such as db resources, your system resources, network/bandwidth speed to do concurrency.

Also, if the queries are taking too long to return because of the concurrent requests, your connection might time out as it remains idle while waiting.

The bottom line is that you may send queries/requests concurrently to the same system, but you will not be getting results concurrently as the queries/requests will be competing against each other.

If anything, if I had to do these queries, I would make sure that they run one after the other, instead of concurrently, by chaining them one after the other, like this:

They most probably will end up running faster like this, as each query will have the max resources available as opposed to sharing resources with each other.


In my experience at least with Oracle the will not run in parallel also in your first image.

I always need to use a separate connector to run them in parallel.

1 Like

Hi @aminfazeli43 , I agree with @kienerj that with Oracle, to run concurrent queries you would have to have each query using a different session, which would mean a different connection.

That is how it is with other Oracle tools too such as Oracle SQL Developer and I would doubt there is anything KNIME can do to get round that.

What database are you using?

Hi @bruno29a and thanks to you.
I tested your solution and it works. I think it’s better than parallelize query readers.
But I want from @thor to open a new ticket for this request if it is possible.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.