Sample Header Ad - 728x90

How does Postgres handle integer data of different sizes in the same column?

2 votes
2 answers
397 views
If I have a bigint column and in one row store 1 and in another store 999999999999, will these take up different amounts of space on disk? Will Postgres have an easier time doing queries and calculations with the smaller data? The motivation for my question is that I have a lot of data in this form: 1000000306429071. I'm wondering if it will be valuable to strip the 1 and leading 0s.
Asked by John Bachir (867 rep)
Jun 19, 2017, 05:56 PM
Last activity: Jun 20, 2017, 12:37 AM