WHAT is the best practice ?:
Save history records in a separate history table
Save history records in active table with different status?
In my opinion, I prefer to keep a separate table in order to avoid creating one huge table with duplicate records, which can cause unwanted delay time when querying the table.
, , "WHERE Status =" LIVE "" WHERE CurrentRecord = 1 " ( , , (), ). , , .. , ad-hoc , .
, , , /db, - /db ..
Pro:, , - . , . , .Con:, , 350 ( , .....). , , . "" "". (), , - ...
, , , .
I prefer to use one table and partioning. I also set the view for active records and would use this instead of the base table when querying active records.
I would go for a separate table, otherwise configuring UNIQUE and FK constraints might still be feasible, but too involved.
Source: https://habr.com/ru/post/1768257/More articles:.Net Charting Controls - Change label format / value - .netC ++ Experience Based Misfeatures - c ++Should tag hierarchies? - taggingHow to implement single sign-on in my java project? - javaIs it possible to specify Mylyn context by default? - javaHow to remove space variables in each line of a text file based on a special condition - single-line in Python? - pythonCheck if Excel workbook is open with VBScript - excelThe input element jQuery.before () and .after () are not working properly, what am I doing wrong? - jqueryTricky MS Access SQL query to remove redundant duplicate records - performanceДобавление дополнительной кнопки к одному объекту в django admin - djangoAll Articles