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

LQ scan / filtering simplification to speed up writes / Singer loads. #464

Merged
merged 7 commits into from
May 18, 2021

Conversation

mildbyte
Copy link
Contributor

When figuring out which objects to scan through, also add objects whose PKs overlap the PKs of the objects we are going to scan through and that come after them.

This is to simplify image creation so that, when making an object, we don't need to care about the old rows it overwrites (and hence don't need to calculate their hash or include it into the object or even find out what they are when we don't have access to the full current table). It will allow us to actually be able to treat objects independently, recalculate their hashes and the index, make it much easier to write to Splitgraph images without checkout etc. The main reason for this is to speed up data ingestion from Singer where we add up chunks of 100k rows and currently have to run a giant JOIN against the current table to figure out which rows we updated.

The tradeoff is that sometimes we'll scan through more objects (in the rare case where we're fetching some rows that aren't overwritten by a latter object but the object they come from partially overlaps with an older object).

mildbyte added 7 commits May 14, 2021 13:16
…se PKs overlap the PKs of the objects we are going to scan through and that come after them.

This is to simplify image creation so that, when making an object, we don't need to care about the old rows it overwrites (and hence don't need to calculate their hash or include it into the object or even find out what they are when we don't have access to the full current table). It will allow us to actually be able to treat objects independently, recalculate their hashes and the index, make it much easier to write to Splitgraph images without checkout etc. The main reason for this is to speed up data ingestion from Singer where we add up chunks of 100k rows and currently have to run a giant JOIN against the current table to figure out which rows we updated.

The tradeoff is that sometimes we'll scan through more objects (in the rare case where we're fetching some rows that aren't overwritten by a latter object but the object they come from partially overlaps with an older object). anyway).
… full current table when appending a new fragment to generate a changeset (to find out the old values of the rows we deleted).
… write out the latest one when ingestion ends.
@mildbyte mildbyte merged commit 7662809 into master May 18, 2021
mildbyte added a commit that referenced this pull request Jul 26, 2021
  * API functionality to get the raw URL for a data source (#457)
  * LQ scan / filtering simplification to speed up writes / Singer loads (#464, #489)
  * API functionality for Airbyte support (`AirbyteDataSource` class, #493)
  * Speed up `sgr cloud load` by bulk API calls (#500)

Full set of changes: [`v0.2.14...v0.2.15`](v0.2.14...v0.2.15)
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