小编Fab*_*iel的帖子

降低 PostgreSQL 中的时间/时间戳精度是否有性能或存储空间优势?

PostgreSQL 允许time/timestamp指定精度:

time, timestamp, 并interval接受一个可选的精度值p,该值指定保留在秒字段中的小数位数。默认情况下,没有明确的精度限制。的允许范围p是 0 到 6。

来自PostgreSQL 13 文档

然而它指出的存储空间是一个常数8字节(timestamptime without timezone为)和12字节time with timezone的无论p

在不需要额外精度的情况下——比如毫秒(p = 3)或秒(p=0)就足够了——显式降低精度是否有优势?

postgresql performance timestamp disk-space

5
推荐指数
1
解决办法
468
查看次数

标签 统计

disk-space ×1

performance ×1

postgresql ×1

timestamp ×1