Spilling properties#


Ниже приведена оригинальная документация Trino. Скоро мы ее переведем на русский язык и дополним полезными примерами.

These properties control Spill to disk.


  • Type: boolean

  • Default value: false

  • Session property: spill_enabled

Try spilling memory to disk to avoid exceeding memory limits for the query.

Spilling works by offloading memory to disk. This process can allow a query with a large memory footprint to pass at the cost of slower execution times. Spilling is supported for aggregations, joins (inner and outer), sorting, and window functions. This property does not reduce memory usage required for other join types.


  • Type: string

  • No default value. Must be set when spilling is enabled

Directory where spilled content is written. It can be a comma separated list to spill simultaneously to multiple directories, which helps to utilize multiple drives installed in the system.

It is not recommended to spill to system drives. Most importantly, do not spill to the drive on which the JVM logs are written, as disk overutilization might cause JVM to pause for lengthy periods, causing queries to fail.


  • Type: double

  • Default value: 0.9

If disk space usage ratio of a given spill path is above this threshold, this spill path is not eligible for spilling.


Number of spiller threads. Increase this value if the default is not able to saturate the underlying spilling device (for example, when using RAID).


Max spill space to be used by all queries on a single node.


Max spill space to be used by a single query on a single node.


Limit for memory used for unspilling a single aggregation operator instance.


  • Type: boolean

  • Default value: false

Enables data compression for pages spilled to disk.


  • Type: boolean

  • Default value: false

Enables using a randomly generated secret key (per spill file) to encrypt and decrypt data spilled to disk.