可以使用 dbschema 实用程序显示数据分发。
除非列值发生很大变化,否则无需重新生成数据分发。 要验证分布信息的精确性,请将 dbschema -hd 输出和相应构造的 SELECT 语句的结果进行比较。
dbschema -hd customer -d vjp_stores
High Mode, 0.500000 Resolution
图: 使用 dbschema -hd 显示数据分发信息
dbschema -hd customer -d vjp_stores ... Distribution for virginia.customer.zipcode Constructed on 09/18/2000 High Mode, 0.500000 Resolution --- DISTRIBUTION --- ( 02135 ) 1: ( 1, 1, 02135 ) 2: ( 1, 1, 08002 ) 3: ( 1, 1, 08540 ) 4: ( 1, 1, 19898 ) 5: ( 1, 1, 32256 ) 6: ( 1, 1, 60406 ) 7: ( 1, 1, 74006 ) 8: ( 1, 1, 80219 ) 9: ( 1, 1, 85008 ) 10: ( 1, 1, 85016 ) 11: ( 1, 1, 94026 ) 12: ( 1, 1, 94040 ) 13: ( 1, 1, 94085 ) 14: ( 1, 1, 94117 ) 15: ( 1, 1, 94303 ) 16: ( 1, 1, 94304 ) 17: ( 1, 1, 94609 ) --- OVERFLOW --- 1: ( 2, 94022 ) 2: ( 2, 94025 ) 3: ( 2, 94062 ) 4: ( 3, 94063 ) 5: ( 2, 94086 )
Overflow = .25 * resolution * number_rows = .25 * .0050 * 28 = .035
有关 dbschema 实用程序的更多信息,请参阅《GBase 8s 迁移指南》。