In my company,we are keeping history tables for update delete etc. in real tables. However, we do not want to too big table. They are growing indefinitely. We should implement a strategy that removes the old records from the history tables. We still don't want to lose this data however. For product table, one solution is take all the history records for a product and store it as jsonb. However, We do not know how we can keep dates as date-time columns also we do not know is it best strategy. I am wondering What is the best solution for this problem and keeping jsonb in date-time columns is possible.
0 Replies