Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data insertion optimization #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nsmith22
Copy link

@nsmith22 nsmith22 commented Jun 9, 2022

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.

ers81239 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.

2 participants