added mysql prcedures for killing longlasting connections and tables optimization