2. A list of rules (code) number field, some number with date, some not, often on business operations by A.c ode query data
3. There are several other Zhang Dabiao and table has A foreign key link, the ID of the storage table A
I use the database schema is to do with ef core, database type for PostgreSql, based on the design of ef core has no good?
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I think
1: is the smallest should be in the development adjustment for table partition, partition table partition according to the scope of the serial number (code), but because the number (code) rules, as partition column is not appropriate? If this table partition can solve, should be the optimal solution of
2: if the code can't as range partitioning fields, to table A table according to the different rules, so that each table is unified, and then carried out in accordance with the code table partition? How do ef core design can better support (development without too much focus on data exactly where there is a table, by the factory or other way), and as other relational tables and how do you cope?
3: depots: depots as subsequent data archive, whether temporarily don't consider first?
CodePudding user response:
Every month there are tens of millions of data, you must have to table depots, this directly by EF is unreliable, this I feel or into a Dapper interact, the other indexes, remember to test whether a certain effect, if the Code can confirm, that the Hash Code can be considered as a result, then the first letter as a standard partition, after, of course, also can consider to int modulus as the standard partitionCodePudding user response:
You can according to the code of hashcode for index and partition,I can only say try it,
CodePudding user response:
Hash partitioning is a way,CodePudding user response:
If possible to partition of the business, you do read and write after the separation in the instance,CodePudding user response: