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

Postgres get_full_data is slow for large datasets #105

Open
MattExact opened this issue May 20, 2024 · 1 comment
Open

Postgres get_full_data is slow for large datasets #105

MattExact opened this issue May 20, 2024 · 1 comment

Comments

@MattExact
Copy link
Contributor

I found that get_full_data was unusably slow for datasets >1m rows.
I believe the culprit is the use of offset/limit pagination, which is not performant for large offsets.

I think a better implementation would be to use a server-side cursor and use fetchmany to fetch size number of rows at a time.
See Psycopg docs for more.

@long2ice
Copy link
Owner

long2ice commented May 20, 2024

OK, could you please make a PR?

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

No branches or pull requests

2 participants