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

Tune performance of iterator() calls with cursor_tuple_fraction #11382

Open
jacobtylerwalls opened this issue Aug 21, 2024 · 0 comments · May be fixed by #11439
Open

Tune performance of iterator() calls with cursor_tuple_fraction #11382

jacobtylerwalls opened this issue Aug 21, 2024 · 0 comments · May be fixed by #11439
Assignees

Comments

@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Aug 21, 2024

We use QuerySet.iterator() in a couple places for indexing and deletion, and we tend to fully exhaust those iterators, so we would probably benefit from setting the cursor_tuple_fraction option:

By default, PostgreSQL assumes that only the first 10% of the results of cursor queries will be fetched. The query planner spends less time planning the query and starts returning results faster, but this could diminish performance if more than 10% of the results are retrieved.

We may wish to set this to 0.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In Review
Development

Successfully merging a pull request may close this issue.

1 participant