Conversation

๐Ÿ˜I insert 5 million rows with increasing value (think sequence, generator, current timestamp, ordered file import...) that takes 110 MB and still 110 MB after an index rebuild. Happy with that?
Image
1
๐Ÿ˜You decide to rebuild, but which fillfactor? 100 to pack for always increasing values? 90 because it is the default? 80 to give more room for same range values? With inserts on same range, leaf pages will be between 100 (full) and 50 (split) so it may eventually average to 75
Image
2
Replying to
Theoretically yes, but ff 96-98 is almost as space efficient but much less risky. Page splits are inevitable when insertions take place, but the rate over time still matters a lot. Note that Postgres 12 internally uses ff 96 for pages full of the same duplicate value.
1
2
Show replies