title: Bukkit/Spigot) Better MySQL stats updating no lag?
body: <p>Hi there I'm having issues with SQL updating player stats which makes very huge  lag/timings drop I'm updating the stats on server stop this is my stats code:</p>
  
  <pre><code>public int getDeaths(Player p) {
      if (!plugin.getConfig().getBoolean("mysql")) {
          return plugin.data.getConfig().getInt("Deaths." + p.getUniqueId() + ".death");
      }
      if (plugin.getConfig().getBoolean("mysql")) {
          int res = 0;
          ResultSet result = getMainSQLConnection()
                  .executeQuery("SELECT * FROM `Account` WHERE playername='" + p.getName() + "'", false);
          try {
              if (result.next()) {
                  res = Integer.parseInt(result.getString("deaths"));
              }
          } catch (SQLException localSQLException) {
          }
          return res;
      }
      return 0;
  }
  
  public void setDeaths(Player p, int number) {
      if (!plugin.getConfig().getBoolean("mysql")) {
          plugin.data.getConfig().set("Deaths." + p.getUniqueId() + ".death", number);
          plugin.data.save();
      }
      if (plugin.getConfig().getBoolean("mysql")) {
          plugin.sqlConnection.executeUpdate(
                  "UPDATE `Account` SET deaths='" + number + "' WHERE playername='" + p.getName() + "'");
      }
  }
  </code></pre>