Home > Net >  EF CORE operating large table
EF CORE operating large table

Time:11-03

1. A table in the database, A possible January article can produce tens of millions of data
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 partition

CodePudding 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:

reference 1/f, Eva will hit soy sauce 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 initials as the partition standard, of course, also can consider to int after modulus as the partition standard

Don't change, change is too big, the project has been launched, as far as possible little changes

CodePudding user response:

refer to the second floor is nu month god reply:
you can be carried out in accordance with the code of hashcode index and partition,
I can only say give it a try,

Well, you can consider

CodePudding user response:

This is a solution of the problem, and what framework technology there is no direct relationship between the specific use

CodePudding user response:

Your code without rules it is hard to imagine, and table was designed to people is a child,,,
  • Related