Question on spool space

Database
Enthusiast

Question on spool space

Spool space is used in different steps of a query. If we run an explain on a query there maybe multiple steps and spools used in them.

Question is that the maximum spool used by the query is combined spool space used by all steps or the maximum spool space used from amongst all the steps?
Tags (1)
1 REPLY
Enthusiast

Re: Question on spool space

The maximum spool used is determined from the amount actually in use at a point in time. Some spools are often deleted after they are used in an intermediate step; then they no longer count as spool used. If you see the phrase "last use" in a reference to an input spool in an explain step, it means that step will delete the spool when it is done.