Disk Space
This section describes the disk space parameters, which are used to set limits on the disk space for storing temporary files.
sql_use_spacelimit
Parameter description: Specifies the space size for files to be written to disks when a single SQL statement is executed on a single database node. The managed space includes the space occupied by ordinary tables, temporary tables, and intermediate result sets to be written to disks. This parameter does not take effect for the initial user. This parameter can be set at the PDB level.
Parameter type: Integer
Unit: KB
Value range: –1 to 2147483647. The value –1 indicates that there is no limit.
Default value: –1. In the PDB scenario, if this parameter is not set, the global settings will apply.
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1. The unit must be KB, MB, or GB if required.
Setting suggestion: Retain the default value.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
temp_file_limit
Parameter description: Specifies the maximum disk space that can be used for temporary files in a session. For example, temporary files that need to be sorted or use outer hash tables in a connection session, and temporary files occupied due to the use of cursors. This parameter can be set at the PDB level.

This parameter does not apply to disk space used for temporary tables during the SQL query process.
In the SMP scenario (query_dop is greater than or equal to 2), the SQL statement in the frontend session is split into several backend threads (the number of split SQL statements is equal to the value of query_dop) for execution. When the size of temporary files generated by any thread reaches the threshold, an SQL error is reported in the frontend session. In this case, the size of temporary files may be greater than the value of this parameter set in the frontend session. (In this scenario, the peak size of temporary files occupied by a single frontend session does not exceed the value of temp_file_limit multiplied by the value of query_dop.)
When the disk usage exceeds the read-only threshold datastorage_threshold_value_check, this parameter is taken over by the CM and is set to 0. In this case, the modification of temp_file_limit does not take effect. After the disk usage is restored, the CM restores this parameter to the default value.
Parameter type: Integer
Unit: KB
Value range: –1 to 2147483647. The value –1 indicates that there is no limit.
Default value: –1. In the PDB scenario, if this parameter is not set, the global settings will apply.
Setting method: This is a SUSET parameter. Set it based on instructions provided in Table 1. The unit must be KB, MB, or GB if required.
Setting suggestion: Retain the default value.
Risks and impacts of improper settings: If the value is too small, frequent I/O operations will occur, causing performance deterioration. If the value is too large, too much disk space may be occupied.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot