How To Quickly Analyze All Tables in MySQL Database ��ο��ٷ��������б����MySQL��ݿ�
ANALYZE TABLE analyzes and stores the key distribution for a table.�����?�����ʹ洢��Կ����? The MySQL query optimizer is the magic inside MySQL that decides which keys, if any, to use to in the query. MySQL��ѯ�Ż���ħ����MySQL�ľ��������еĹؼ�����еĻ������ڲ�ѯ�С� ANALYZE helps query optimizer to make accurate decisions by detailed analysis of the data, unlike query optimizer which makes quick analysis.���������ڲ�ѯ�Ż�������ȷ�ľ�������ϸ����ݷ�������ͬ�IJ�ѯ�Ż���ʹ���ٷ�����
The command to analyze all tables in a running database is:�������Է����������ϱ������е���ݿ��ǣ�
mysqlcheck -Aa -uroot -p mysqlcheck -��ܾ�- uroot -
Provide the password when prompted.�ṩ������ʾʱ��
You can add it to your daily / weekly cron job for optimum performance of the database.����Խ�����ӵ����ÿ��/ÿ����ҵΪ������ܵ���ݿ⡣ The password can be provided in command line too.������ṩ��������Ҳ��
During the analysis, the table is locked with a read lock for MyISAM and BDB.�ڷ������ñ�������һ��ֻ����Ϊmyisam��bdb �� ANALYZE works with MyISAM, BDB, and InnoDB tables.����������myisam �� bdb ����InnoDB�?
Note: Running ANALYZE is equivalent to running myisamchk -a or myismachk �Canalyze .ע�⣺���еķ����ǵȼ۵ķ���������myisamchk - A��myismachk -���� ��
Filed under������ Database��ݿ� , �� Enterprise Software��ҵ��� , �� Headline Newsͷ������ , �� How To��� , �� MySQL MySQL�� , �� Open Source Software����Դ����� , �� RDBMS RDBMS�� , �� Tech Note����˵�� | |
| |
RSS 2.0 2.0 | |
Trackback Trackback���� this Article |������|
Email this Article�����ʼ�������
You may also like to read��Ҳ������� |




































