1. The connection must be closed explicitly. Otherwise, a large amount of memory usage cannot be recycled.
2. Before closing the connection, all commands Based on the connection must be analyzed first.
3. It is better to recreate a table to delete massive data.
4. It is best to set the wrapper to inline.
5. query performance of massive data is often caused by the absence of indexes for specific fields and the removal of unnecessary fields.
6. You do not need to create many structures, but use tuple and so on.
7. Data Access logic is not the same as business logic and modelview. It should be clearly defined and considered in a single context.
8. Do not use a one-time transaction. It is reasonable to have no 10 thousand commit or restart the transaction such as insert.
9. It is normal that the release mode is 30 times faster than the debug mode, so there is no need to worry too much.