public int executeUpdate(String sql) throws SQLException {
            Instant start = Instant.now();
            int result = stmt.executeUpdate(sql);
            Instant end = Instant.now();

            // determine the type of query
            String sqlL = sql.toLowerCase().trim();

            if (sqlL.startsWith("insert")) {
                addQuery(Type.insert, sql, Duration.between(start, end));
            }
            else if (sqlL.startsWith("update")) {
                addQuery(Type.update, sql, Duration.between(start, end));
            }
            else if (sqlL.startsWith("delete")) {
                addQuery(Type.delete, sql, Duration.between(start, end));
            }
            else {
                addQuery(Type.select, sql, Duration.between(start, end));
            }
            return result;
        }
Creates a new TimedStatement that wraps {@code stmt}.

@param stmt the statement.
xmppserver/src/main/java/org/jivesoftware/database/ProfiledConnection.java