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

perf: decrease the threshold in which we use the BQ Storage Read API #1925

Merged
merged 4 commits into from
May 21, 2024

Conversation

tswast
Copy link
Contributor

@tswast tswast commented May 21, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@tswast tswast requested review from a team as code owners May 21, 2024 16:28
@tswast tswast requested a review from Neenu1995 May 21, 2024 16:28
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-bigquery API. labels May 21, 2024
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels May 21, 2024
# In microbenchmarks, the first full page will be about 10 MB. If a page is
# about 2 MB, then it's the same speed or faster to download all the results
# using the BigQuery Storage Read API.
ALMOST_COMPLETELY_CACHED_RATIO = 10 / (10 + 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm following the comment. In usage this appears to be a row ratio, but the comment is about response wire sizes? Also, should the value just remain a float literal? There's no parameter plugging in here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the comment to explain more my methodology. Unfortunately, this heuristic isn't perfect, as it breaks down with large rows.

Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarifications

@tswast tswast merged commit eaa1a52 into main May 21, 2024
21 checks passed
@tswast tswast deleted the tswast-perf-bqstorage branch May 21, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants