archesproject/arches

Tune performance of iterator() calls with cursor_tuple_fraction

Closed this issue · 0 comments

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.