Skip to content

Data insertion optimization#35

Open
nsmith22 wants to merge 3 commits into
datamill-co:masterfrom
minwareco:data-insertion-optimization
Open

Data insertion optimization#35
nsmith22 wants to merge 3 commits into
datamill-co:masterfrom
minwareco:data-insertion-optimization

Conversation

@nsmith22

@nsmith22 nsmith22 commented Jun 9, 2022

Copy link
Copy Markdown

Update the target-postgres dependency to get the latest master branch commit, which is many commits ahead of the 0.2.4 package version. This provides several performance optimizations that have been added, such as:

Additionally, bypass table insertion work when the record count is zero. The code still respects the persist_empty_tables setting to manage the table schema itself, but will not go through the expensive process to perform a zero-record insertion. That process takes ~6s per table and is effectively a no-op. For table-heavy taps, this saves a lot of wasted time.

Testing

Tested locally with a few of my own taps. A tap with ~25 tables and no new data was able to run in ~40 instead of ~1m45s, mostly due to the code which skips table data insertion when the data batch has zero records.

edward and others added 3 commits January 13, 2022 09:44
… by bumping its package dependency.

Avoid writing table batch when record count is zero.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant