database - MySQL queries waiting for other queries to finish -


we have 30-40 different projects in python , php update, insert , select more 1 million rows of data in mysql db every day.

currently use innodb engine our tables.

the problem: have peaks in mysql when projects working , lots of queries processing in db. there main queries important finish asap (high priority) , queries can wait finish of main queries (less priority). go mysql concurrent causes main queries wait finishing of less priority queries.

questions:

  1. is there possibility release lock in tables before executing main queries (so can finish asap)? or create locks if help?

  2. can pause less priority queries execution when start execution main queries automatically?

  3. can use high_priority , low_priority in queries help?

  4. are there configurations in mysql can help?

  5. can changing tables myisam or other db engine help?

let me know thoughts , ideas.

  1. no. might try upgrading mysql 5.7 allows parallel replication within tables if transactions not interfere each other.
  2. see http://dev.mysql.com/doc/refman/5.7/en/lock-tables.html how low priority has no effect.
  3. see #2.
  4. it better how doing locking in application - -are locking rows up, making changes, unlock or code in leisurely fashion?
  5. myisam locks @ table level not row level , myisam not support transactions (which why locking records).

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -