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(postgres): improve to_pyarrow_batches by using server-side cursors #10954

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ronif
Copy link

@ronif ronif commented Mar 7, 2025

This adds a specific to_pyarrow_batches implementation to the PostgreSQL backend, which uses server side cursors. This allows ibis to allocate memory needed only for chunk_size results of the query instead of the whole set.

Resolves #10938

@github-actions github-actions bot added the postgres The PostgreSQL backend label Mar 7, 2025
Copy link
Contributor

github-actions bot commented Mar 7, 2025

ACTION NEEDED

Ibis follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message.

Please update your PR title and description to match the specification.

@cpcloud cpcloud force-pushed the feat(postgres)--to_pyarrow_batches-with-server-side-cursor branch from 93e17e0 to 98f7f41 Compare March 7, 2025 13:51
@cpcloud cpcloud changed the title Add to_pyarrow_batches for postgres perf(postgres): improve to_pyarrow_batches for postgres by using server-side cursors Mar 7, 2025
@cpcloud cpcloud changed the title perf(postgres): improve to_pyarrow_batches for postgres by using server-side cursors perf(postgres): improve to_pyarrow_batches by using server-side cursors Mar 7, 2025
@cpcloud
Copy link
Member

cpcloud commented Mar 7, 2025

I'll add a benchmark to this PR before merging it, thanks!

@cpcloud cpcloud force-pushed the feat(postgres)--to_pyarrow_batches-with-server-side-cursor branch from 98f7f41 to 28c1057 Compare March 7, 2025 14:35
@github-actions github-actions bot added the tests Issues or PRs related to tests label Mar 7, 2025
@cpcloud cpcloud force-pushed the feat(postgres)--to_pyarrow_batches-with-server-side-cursor branch from 28c1057 to e234a7e Compare March 7, 2025 14:36
@cpcloud cpcloud added the performance Issues related to ibis's performance label Mar 7, 2025
@cpcloud cpcloud force-pushed the feat(postgres)--to_pyarrow_batches-with-server-side-cursor branch 2 times, most recently from 1738882 to 54f1f00 Compare March 7, 2025 14:54
@cpcloud cpcloud force-pushed the feat(postgres)--to_pyarrow_batches-with-server-side-cursor branch from 54f1f00 to 3cc04d7 Compare March 9, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues related to ibis's performance postgres The PostgreSQL backend tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Improve to_pyarrow_batches for PostgreSQL backend
2 participants