This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
Potential performance and developer experience improvements/investigation around database inserts and PKs #244
Labels
enhancement
New feature or request
Describe the resource.
Currently the insert logic is as follows:
Given that in big account most of the resources stays the same will CopyFrom always fail? Can we benchmark the onconflict replace?
Another thought is that there is two highly related fields - Primary keys and DeleteFilter.
Might be interesting to benchmark the following insert algorithm:
- Delete from table where account_id=something, region=something # (or any deletefilter) ;
- insert into table from table_tmp where delete_filter;
Things to measure:
- database performance in both cases
Advantages:
- Developer experience: PK might not be needed in addition to
deletefilter
as well as bugs with wrong pks might occur less.- the main table might be more consistent as it wont contain "delete resource"
- Given that most of the bugs where incorrect PKs and not duplicate data (apart from a few global resources) those bugs and maintains can be solved.
Disadvantages:
- ( Depending on the performance test ) It might take more time for the main table to be updated with new data
- It might be harder to detect duplicate data
Use Case
Performance and dev experience
Additional context
No response
The text was updated successfully, but these errors were encountered: