Redshift 真空排序默认

Redshift vacuum sort default

"By default, VACUUM skips the sort phase for any table where more than 95 percent of the table's rows are already sorted" 为什么默认值是 95 而不是 100?

100% 到 95% 排序的性能提升 table 可以忽略不计吗?

VACUUM 是一个非常密集的操作。 95% 与 100% 排序 table 的性能优势微乎其微。因此,在VACUUM操作中省去了很多无用功。

VACUUM documentation 说:

By default, VACUUM skips the sort phase for any table where more than 95 percent of the table's rows are already sorted. Skipping the sort phase can significantly improve VACUUM performance. To change the default sort or delete threshold for a single table, include the table name and the TO threshold PERCENT parameter when you run VACUUM.

因此,如果需要,您始终可以强制进行 100% 排序。