MySQL Forums
Forum List  »  Performance

Optimize multiple writes on the same row
Posted by: Francis Page
Date: March 14, 2012 02:16PM

I would like to compute some values like the sum and average of some columns of a table with millions of rows. Those values are stored another table.

I would like to have the sum and average computed in real time: every time a row is inserted or updated. I thought about using a running average to avoid doing a SELECT SUM, AVG, but it causes performance issues. As there is a lot of inserts and updates on the source table, it generates a lot a writes on the same rows of the second table.

Is there a solution for this kind of problem, where a lot of concurrent queries are trying to update the same row of the same table?

Thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
Optimize multiple writes on the same row
2878
March 14, 2012 02:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.