Databases

Your database performs slowly than usual. More specifically, your queries are taking a lot of time. What would you do?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

  • Query for running queries and cancel the irrelevant queries
  • Check for connection leaks (query for running connections and include their IP)
  • Check for table locks and kill irrelevant locking sessions