Remove redundant MySQL commands