Hot answers tagged optimization
What are the possible reasons of the slow table insert? What are ways to identify this bottleneck without the execution plan? Read How to analyse SQL Server performance, specially the part about Analyzing individual query execution wait times. What actions can I take to reduce the cost of the table insert? That would depend largely on the result ...
If you don't need to retain the data from the previous day when you update the data, you could do this without downtime: Day 1: insert data from API into Table1 Day 2+: create a new table with the same structure as Table1 create NewTable like Table1; insert API data into NewTable (note: app is still using Table1 at this point) switch out the ...
Yes, an index will help. Without an index all the RDBMS can do is start at the beginning of the data and work its way toward the end, stopping when it finds what it's looking for. This is a O(N) operation. With a B-Tree index in place it reduces to O(log(N)). This is true whether the data is held on disk or in memory.
What about using audit and logging it to an external server? This might be a viable solution. You don't mention what version or if you are MySQL or MariaDB. I assume MySQL McAfee has one if you are MySQL and not an Enterprise customer.
Only top voted, non community-wiki answers of a minimum length are eligible