ANALYZE TABLE analyzes and stores the key distribution for a table.���͕\��X�܂̃L�[���z�𕪐͂��A�\�̂Ƃ���ł��B The MySQL query optimizer is the magic inside MySQL that decides which keys, if any, to use to in the query. MySQL�̃N�G���I�v�e�B�}�C�U�́A�ǂ̃L�[�����肷��}�W�b�N�̓�����MySQL�́A��������΁A���āA�N�G�����g�p���Ă��܂��B ANALYZE helps query optimizer to make accurate decisions by detailed analysis of the data, unlike query optimizer which makes quick analysis.�N�G���I�v�e�B�}�C�U�̕��͂ɖ𗧂��܂����m�Ȉӎv��������̃f�[�^���ڍׂɕ��͂���A����ɂ��v���ɉ�͂���Ƃ͈قȂ�A�N�G���I�v�e�B�}�C�U�ł��B

The command to analyze all tables in a running database is:���̃R�}���h�𕪐͂��邷�ׂẴe�[�u���ɂ́A���s���̃f�[�^�x�[�X�́F
mysqlcheck -Aa -uroot -p mysqlcheck -�P3 - uroot - p

Provide the password when prompted.�v�����v�g���\�����ꂽ��p�X���[�h��񋟂��Ă��܂��B

You can add it to your daily / weekly cron job for optimum performance of the database.�����lj����邱�Ƃ��ł��܂����Ė���/���Tcron�W���u�́A�f�[�^�x�[�X�̃p�t�H�[�}���X���œK�����܂��B The password can be provided in command line too.�p�X���[�h���R�}���h���C���Œ񋟂���邱�Ƃ��������܂����B

During the analysis, the table is locked with a read lock for MyISAM and BDB.���̕��͂ƁA�e�[�u�������b�N����A�ǂݎ�胍�b�N�A MyISAM��bdb�ł��B ANALYZE works with MyISAM, BDB, and InnoDB tables.���앪�͂�MyISAM �A bdb �A�����InnoDB�e�[�u���ł��B

Note: Running ANALYZE is equivalent to running myisamchk -a or myismachk –analyze .���L�F���s���̕��͂����s����Ɠ�����myisamchk - a�܂���myismachk -�������܂��B