Hello all,
Why is the time index default DESC?
Reading this post https://dba.stackexchange.com/questions/340021/should-a-time-index-be-in-ascending-or-descending-order with the answer
“You should definitely create the index in ascending order, unless you insert the rows in descending order. […] But PostgreSQL’s B-tree indexes are optimized for inserting values at the upper end, while there is no such optimization for the lower end. So if you are inserting time series data where the timestamps generally keep increasing, an ascending index is better.”
I would have assumed, that the index is created as ASC by default.
I’d like to understand the reason behind the decision DESC as default. As I couldn’t find anything regarding that topic I’d like to ask if anybody please can explain it to me? Thanks.
Best regards,
Paul
4 posts - 2 participants