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

Using stream #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

WillianAgostini
Copy link

Hi,

I'm sending some significant enhancements to optimize the script's performance. Here are the main changes implemented:

Streaming Query:
Instead of using the skip() function to query the database, we're now leveraging the power of streaming to retrieve data as it's being read. This eliminates query overhead and provides a continuous flow of data in a single query.

Batch Insertion:
To improve data insertion performance, we're now inserting data in batches.

Furthermore, we continue to apply the concepts of child processes. However, this time, I've implemented a dedicated child process solely for data querying. Once a list of items is accumulated, it's sent to other processes for parallel insertion, maximizing the benefits of parallelization already incorporated previously.

@ErickWendel
Copy link
Owner

Unfortunately, this is part of the source code provided in the video, I can't change the code as people would use it in case of any problem. Thanks a lot for the contibution!!

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.

None yet

2 participants