Help Center/ GaussDB/ Developer Guide(Centralized_V2.0-8.x)/ Best Practices/ Best Practices for VACUUM/ FAQ/ How Do I Locate Inaccurate Statistics Such as Number of Dead Rows in the Database?
Updated on 2025-05-29 GMT+08:00

How Do I Locate Inaccurate Statistics Such as Number of Dead Rows in the Database?

You can use ANALYZE to update the statistics. If there is a significant difference in dead row data before and after the execution of ANALYZE, it indicates that the statistics are inaccurate. Note that ANALYZE is performed based on sampling. Therefore, there is a certain error. When a large number of empty pages exist in the table, the accuracy of statistics by sampling may be affected. In this case, you can use the gs_parse_page_bypath tool mentioned in the preceding to increase the sampling ratio to parse the pages more accurately and calculate the number of dead rows.