mysql - Minimizing table deadlock in my scenario with oracle and innodb -


I have 35 functions that update between 1 to 3 tables in transactions, however, they do not just execute updates, But they also fix the questions.

  • Table 1 row updates only work, and some queries.
  • The table 2 queries and row level updates for existing rows, and occasionally deletes and adds rows in the table 2 and delete the row and inclusion, and or before and after the update. There can be questions within.
  • Table 3 updates the row based on the results of the table 2 above.

My first action will be to ensure that the table 3 updates will end completely.

The table 1 is independent of the other 2 tables, and maybe before or last, then the table 2 should come before the change of Table 3.

My first concern is that with table 2 verbs, I question, then update, then more questions, I do not have to repeat my code, not to do so.

My second concern is that Table 3 is the table that should be sharp with the sublet thread, Table 3 is used only for the query by itself. But it seems that the row-level lock will stop those questions.

If I have to do this, I can put the table set maintenance code mentioned above in a cluster-wide process, from a thread. The speed of the update does not matter, only that the questions against the table 3 are fast and that there is never a standoff.

I do not have any differences between Oracle and Innodb, so I have questions. (I'm planning to upgrade to Oracle later.)

Actually, I'm looking for an indication of what to look for. Of course, I can force a full table lock on Table 2 and then apply Table 3 at the beginning of every updator function, but then my table 3 service query query will be affected. So it does not look like a solution.

In addition to this, I am only concerned about 2 tablets, based on some query queries, updates based on updates, new queries, and more updates, including results 3 for updating the table. Are there. It sounds really bad.

Recommendations? Andy

2 tables can be updated simultaneously in the same line, and I have taken care to hit tables with updates in the same sequence. One of the tables has 2 indexes, and it seems that a table lock is required to update the index? Update some task query table 1, table 1, then optionally query table 2, then update table 2, repeat loop. This table holds the relationships of the parents of all the parents in all my material trees, so it is being updated in high volume among all users. First of all, questions in Oracle (and I believe that Inodbi) do not take a lock unless you use it for updates.

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -