What's a good way to go about estimating the amount the temp space required by a sql (with a bunch of DISTINCT, ORDER BY, GROUP BY, UNION, INTERSECT, MINUS etc) before running it?