HTAP
This section describes the parameters related to the hybrid transactional/analytical processing (HTAP) feature.
enable_htap
Parameter description: Specifies whether to enable the HTAP feature. After the HTAP feature is enabled, the inventory row-store data of the column specified by the COLVIEW keyword is loaded to the in-memory column view (IMCV). It is used to improve the query efficiency of the analytical processing (AP). This parameter must be disabled for the multi-tenant database feature.
Parameter type: Boolean.
Unit: none
Value range:
- on: The HTAP feature is enabled.
- off: The HTAP feature is disabled.
Default value: off
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter is disabled by default. If you need to enable this parameter, consider the database application scenario. When a large number of APs need to be queried, enable this parameter to improve the query efficiency. You are advised not to enable this parameter in only TP query scenarios.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
htap_max_mem_size
Parameter description: Specifies the upper limit of the available memory for the HTAP feature. This parameter depends on the enabling status of the HTAP feature. After the dynamic memory usage of GaussDB reaches the upper limit, no more memory can be allocated even if the HTAP memory usage does not reach the upper limit.
Parameter type: integer.
Unit: KB
Value range: 102400 to 1073741824
Default value: 1048576, that is, 1 GB.
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1. For example, if this parameter is set to 1000000 without a unit, it indicates 1000000 KB. If this parameter is set to 1GB, it indicates 1 GB. The unit must be KB, MB, or GB if required.
Setting suggestion: The value of this parameter cannot exceed the value of max_process_memory and the maximum shared memory. Allocate idle memory as the value of this parameter based on the actual application scenario.
Risks and impacts of improper settings: The htap_max_mem_size setting is based on the dynamic memory and memory management mechanism of GaussDB. If max_process_memory is set improperly, htap_max_mem is set to a large value, or logical memory management is disabled, the system memory may be insufficient. If htap_max_mem_size is set to a small value, the created IMCV may frequently trigger the memory insufficiency exception.

You can query the maximum dynamic memory and used dynamic memory in the gs_total_memory_detail view. max_dynamic_memory indicates the maximum dynamic memory, and dynamic_used_memory indicates the used dynamic memory.
htap_memctl_policy
Parameter description: Specifies the memory management policy mode of the HTAP feature. This parameter depends on the enabling status of the HTAP feature.
Value type: enumerated type.
Unit: none
Value range:
- delete: When the HTAP memory is insufficient, delete the memory data in the memory column to release the memory. The upper limit of the HTAP memory is specified by the htap_max_mem_size parameter.
- swap: Data exchange occurs when the HTAP memory is insufficient. Infrequently used data is flushed to local disks. In the current version, this function does not take effect.
Default value: delete
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
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.
enable_imcvscan
Parameter description: Specifies whether to enable the HTAP memory column scanning operator IMCVScan. This parameter depends on the enabling status of the HTAP feature.
Parameter type: Boolean.
Unit: none
Value range:
- on: The scanning operator IMCVScan of the HTAP memory column is enabled.
- off: The scanning operator IMCVScan of the HTAP memory column is disabled.
Default value: on
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
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.
enable_parallel_populate
Parameter description: Specifies whether to enable the parallel loading feature of converting inventory row-store data to memory column IMCV to accelerate IMCV table creation. This parameter depends on the enabling status of the HTAP feature.
Parameter type: Boolean.
Unit: none
Value range:
- on: Data is loaded in parallel mode.
- off: Data is loaded in serial mode.
Default value: off
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value.
Risks and impacts of improper settings: If this parameter is enabled, loading row-store data to IMCV tables may affect the performance of row-store tables. Set this parameter based on the application scenario. After this parameter is enabled, the number of tables or partitions that can be concurrently loaded at a time (the sum of the number of non-partitioned tables and the number of partitions in partitioned tables) cannot be too large. The maximum value is calculated using the following formula: min(max_connections/40, 100). In multi-table scenarios, you are advised to concurrently load tables in batches.
htap_router_mode
Parameter description: Specifies the HTAP transparent routing mode based on the enabling status of the HTAP feature.
Value type: enumerated type.
Unit: none
Value range:
- row: The query is forcibly loaded to select a row-store plan.
- column: When columns in a query request are loaded to IMCV, the column-store plan IMCVScan is forcibly executed regardless of the cost. If some columns are not loaded to IMCV, the row-store plan is executed.
- auto: The system automatically selects a hybrid plan based on whether the columns in the query request are loaded to IMCV and the cost of the row-column plan.
Default value: row
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: If there are hybrid loads, you are advised to set this parameter to auto.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
htap_flush_workers
Parameter description: Specifies the maximum number of working threads for synchronizing incremental row-store data to the IMCV row group. This parameter depends on whether the HTAP feature is enabled.
Parameter type: integer.
Unit: none
Value range: 1 to 100
Default value: 3
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value. Increasing the value of this parameter improves AP performance, but may affect TP performance. Decreasing the value of this parameter affects AP performance.
Risks and impacts of improper settings: If the value is too large, the TP performance may be affected. If the value is too small, the AP performance may be affected. The default value is recommended.
htap_flush_pagenum
Parameter description: Specifies the dirty page threshold for synchronizing incremental row-store data to the IMCV row group. If the number of dirty pages is greater than the threshold, synchronization is triggered. This parameter depends on the HTAP feature.
Parameter type: integer.
Unit: none
Value range: 1 to 1000
Default value: 512
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value. Decreasing the value of this parameter improves AP performance, but may affect TP performance. Increasing the value of this parameter affects AP performance.
Risks and impacts of improper settings: If the value is too small, the TP performance may be affected. If the value is too large, the AP performance may be affected. The default value is recommended.
htap_flush_interval
Parameter description: Specifies the maximum time interval for synchronizing incremental row-store data to the IMCV row group. This parameter depends on whether the HTAP feature is enabled.
Parameter type: integer.
Unit: second
Value range: 1 to 36000
Default value: 300
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value. Decreasing the value of this parameter improves AP performance, but may affect TP performance. Increasing the value of this parameter affects AP performance.
Risks and impacts of improper settings: If the value is too small, the TP performance may be affected. If the value is too large, the AP performance may be affected. The default value is recommended.
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