Quantcast
Channel: User Schwern - Stack Overflow
Viewing all articles
Browse latest Browse all 581

Comment by Schwern on Extract duration from interval during working hours in PostgreSQL

$
0
0
1) Consider using one tstzrange instead of start/end. They're easier to work with and index. 2) Don't store derived values like duration. If start_timestamp or end_timestamp change, duration might not be updated. Instead use a generated column or view.

Viewing all articles
Browse latest Browse all 581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>