SPOOL_QUERY_RESULTS Query Option

Use the SPOOL_QUERY_RESULTS query option to enable query result spooling, which is disabled by default.

Query result spooling controls how rows are returned to the client.
  • When query result spooling is disabled (SPOOL_QUERY_RESULTS = FALSE), Impala relies on clients to fetch results to trigger the generation of more result row batches until all the result rows have been produced. If a client issues a query without fetching all the results, the query fragments will continue to consume the resources until the query is cancelled and unregistered, potentially tying up resources and cause other queries to wait for extended period of time in admission control.
  • When query result spooling is enabled (SPOOL_QUERY_RESULTS = TRUE), the result sets of queries are eagerly fetched and spooled, either in memory or on disk.

    Once all result rows have been fetched and stored in the spooling location, the resources are freed up. Incoming client fetches can get the data from the spooled results.

Type: BOOLEAN

Default: FALSE

Added in: Impala 3.4

Related information: DEFAULT_SPILLABLE_BUFFER_SIZE Query Option, MAX_SPILLED_RESULT_SPOOLING_MEM Query Option, MAX_RESULT_SPOOLING_MEM Query Option