Check out our latest eBook: "Efficient Search in Rails with Postgres". We've updated our Terms of Service and Privacy Policy, effective Jan 30, 2021.

EXPLAIN - Insights: Hash Batches

Description:

When a Hash node builds a hash table, it may need to store a lot of table data in memory. If this runs up against work_mem limits, the algorithm can “spill” to disk and process data in batches. This ensures it can continue, but, as always, writing to disk during query execution can slow things down dramatically.

Recommended Action:

Increase work_mem until the hashing can be performed in a single batch.



Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →