I have an application: producer (from a DB) to a consumer.
The current bottleneck is the producer from DB (based on a query) and I would like to speed it up.
I have tried using several entity managers (same DB instance) to benefit from the parallelisation - but it looks like I don't get much benefit from doing that.
I profiled the application - and it looks like there are some benefits - i.e. each query in a thread is running simultaneously - but it looks sometimes the "query threads" are waiting from something (appears in "monitor" in netbeans). I am not sure what it is - but my guess it is coming from some ObjectDB low level I/O settings?
Any help on how to speed up query by doing parallelization would be appreciated - or best practice.