The invention discloses a 
database optimization method and 
system, and belongs to the technical field of databases. The 
database optimization system comprises a 
storage area division module, a keywordfeature extraction module, a query calling module, a comprehensive analysis module, a clustering 
processing module and a 
query optimization module. The 
storage area division module is connected withthe keyword 
feature extraction module, the overall planning analysis module is respectively connected with the keyword 
feature extraction module, the query calling module and the clustering processingmodule, and the 
query optimization module is connected with the clustering 
processing module. The invention provides a 
database optimization method and 
system. The method comprises the following steps of: extracting keywords from data in each line 
list in each partition table in a database. The method has the advantages that the extracted keywords are extracted, 
weight statistics and clustering analysis are performed on the extracted keywords, database search is optimized, hierarchical distribution query is adopted, the query complexity is reduced, the search efficiency is improved, unnecessary repeated links are reduced, the 
time cost is saved, and the 
database optimization efficiency is greatly improved.