Do you need the sorting as part of the loading process? If not, the best route 
would be to use the data streamer to load the data. You can still use the SQL 
engine and access your sorted data afterwards — remember that SQL and key-value 
are two different ways of accessing the same underlying data.

> On 15 Jun 2020, at 15:46, adipro <aditya.har...@zohocorp.com> wrote:
> 
> We have an SQL table which we need because for normal JCache K-V we cannot
> sort on some column's data. We need that sort feature. That's why we chose
> SQL table representation.
> 
> Our application is heavily multi-threaded.
> 
> Now when trying to insert rows in that table, each thread simultaneously
> sends 5000-10000 rows in bulk. Now if we use, SqlFieldsQuery, it's taking so
> much of time as we cannot do it in bulk and have to do it in loop one by
> one.
> 
> For this case, we are using JDBC thin driver.
> 
> But since it's multi-threaded we can't use single connection to execute in
> parallel as it is not thread safe.
> 
> So, what we did is, we added a synchronisation block which contains the
> insertion of those rows in bulk using thin driver. The query performance is
> good, but so many threads are in wait state as this is happening.
> 
> Can someone please suggest any idea on how to insert those many rows in bulk
> efficiently without threads waiting for so much time to use JDBC connection.
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Reply via email to