Increase work_mem for the current transaction only.
Section: Planner Settings and Statistics
Set LOCAL work_mem
sql
sql
SET LOCAL work_mem = '256MB';Explanation
See summary for usage details.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Planner Settings and Statistics
Show effective_cache_size
Inspect a planner estimate of OS cache availability.
Show random_page_cost
Inspect a cost parameter that influences index-vs-seqscan decisions.
Disable seqscan for investigation
Temporarily discourage sequential scans while investigating plans.