Skip navigation links

MySQL Forums :: Performance :: Optimize multiple writes on the same row


Advanced Search

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 1303 Francis Page 03/14/2012 02:16PM
Re: Optimize multiple writes on the same row 491 Rick James 03/15/2012 10:41AM
Re: Optimize multiple writes on the same row 601 Francis Page 03/16/2012 05:31AM
Re: Optimize multiple writes on the same row 448 Rick James 03/18/2012 10:06AM
Re: Optimize multiple writes on the same row 570 Francis Page 03/19/2012 08:33AM
Re: Optimize multiple writes on the same row 552 Rick James 03/20/2012 11:32AM
Re: Optimize multiple writes on the same row 438 Francis Page 03/22/2012 11:49AM
Re: Optimize multiple writes on the same row 650 Rick James 03/23/2012 11:35AM


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.