1. A method for executing a query on a multi-database system, the multi-database system comprising a first system database and a second system database, the method comprising: partially executing the query on the first system database by generating a spool; determining that it is more efficient to store the spool on the second system database than to store the spool on the first system database, and in response: storing the spool on the second system database; continuing to execute the query by accessing the spool on the second system database; completing execution of the query to produce a result; and storing the result.