The invention relates to the technical field of SQL databases, in particular to a multi-dimensional comprehensive database SQL auditing and optimizing method and system. The system comprises a WEB front end, a service background and a database, the WEB front end comprises a work order submitting module, a work order auditing module, an optimization recording module, a standard configuration moduleand a quality visualization module. The service background comprises an API service module, a data acquisition module, an SQL management module, an auditing engine module, an optimization engine module and a task scheduling module. The database comprises an audit intermediate library module, a test database module and an online database module, the SQL audit speed, the database structure optimization speed and the SQL optimization speed can be greatly increased, the daily work pressure of database DBA is reduced, and the influence of SQL performance hidden danger on the online environment iseffectively prevented.