On 03/11/2014 01:24 PM, Parul Lakkad wrote:
> Hi,
>
> I am trying to figure out when disk is used to store intermediate results
> while performing joins in postgres.
>
> According my findings using 'explain analyse ' only merge sort uses disk.
> Can anyone please throw some more light on this?
Hash joins will also spill to disk if the hash-side of the join is large
enough. The planner usually tries to avoid it, but sometimes it happens.
- Heikki