Current CTO exploring entrepreneurship on the side; coach; mentor; instructor.
Dedicated to promoting digital literacy and ideological diversity in tech.
If an insert is taking that long, then you probably have something to clean up on your indices.
I'd take a look at those first.
As for queries where processing time is an issue, you can solve some of these problems by running them locally on the database server, as opposed to over a network connection.
So your application would log the job as needing to be completed and put it in a processing queue.
A service on the database server would read jobs out of the queue and process them locally.
Then, you can either have a separate job constantly check if the job is done, or wait for the original job to notify something or someone once it's completed.
Current CTO exploring entrepreneurship on the side; coach; mentor; instructor.
Dedicated to promoting digital literacy and ideological diversity in tech.
So, a couple of things:
If an insert is taking that long, then you probably have something to clean up on your indices.
I'd take a look at those first.
As for queries where processing time is an issue, you can solve some of these problems by running them locally on the database server, as opposed to over a network connection.
So your application would log the job as needing to be completed and put it in a processing queue.
A service on the database server would read jobs out of the queue and process them locally.
Then, you can either have a separate job constantly check if the job is done, or wait for the original job to notify something or someone once it's completed.
I went with this solution and worked out well.
Glad it worked out :)