Tag Info

New answers tagged

1

I think @a_horse_with_no_name is right about that the index is updated once per statement, because if the statement has not completed its execution the data will not be visible since it is in transaction. And the definition of a statement includes having multiple values And accoriding to the docs here index creation/update works more efficient with batches ...


0

I believe it's necessary to refer what kind of data your table is storing. Let's say that from C1-C10 you're keeping one group of data and it may be possible that the data in C1-C10 may be redundant (ie, it's possible that you may have the same row of data from C1-C10 throughout your Master Table). Hence, it's wasteful to have redundant data because you're ...


0

MySQL changes plan depends on it's assumption of the index efficiency. InnoDB perform several index lookups right after opening the table and pass these values to MySQL optimizer which is creating actual plan for every query. Sometimes these lookups may not be enough to build correct plan. I could recommend to check if this is the case by increasing ...


1

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 ...


1

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.


0

PL/pgSQL functions are black boxes to the query planner. Queries inside are optimized just like other queries, but separately and one by one like prepared statements, and the execution plan may be cached for the duration of the session. Details: PostgreSQL Stored Procedure Performance Like @Daniel already commented, you can use the additional module ...


5

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 ...


1

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.



Top 50 recent answers are included