Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - SQL 的用法 » 监控和提高数据库性能 » 应用程序分析教程 » 教程:诊断表碎片

 

第 3 课:检查表碎片

要检查是否存在表碎片(例如,CALL sa_table_fragmentation( 'tablefrag' );),请运行 sa_table_fragmentation 系统过程。如果每行的分段数大于 1.1,则存在表碎片。等级较高的碎片可能会对性能造成负面影响。请参见sa_table_fragmentation 系统过程

您在本教程中创建的表应具有的碎片值约为 1.9。

在 Interactive SQL 中,运行以下 SQL 语句以减少表碎片:

REORGANIZE TABLE tablefrag;

请参见REORGANIZE TABLE 语句

另请参见