Configuring ndp_mode in Sessions
Parameter Description
NDP in sessions is disabled by default. You can enable it by setting ndp_mode.
- If ndp_mode is set to OFF, NDP is disabled.
- If ndp_mode is set to ON, NDP is enabled.
- If ndp_mode is set to REPLICA_ON, NDP is only enabled on read replicas.
By default, NDP can be configured for instances with 16 or more vCPUs. It cannot be enabled for instances with 8 or fewer vCPUs. To enable it, submit a request to modify the innodb_ndp_max_threads parameter by choosing Service Tickets > Create Service Ticket in the upper right corner of the management console.
SQL statements can use or do not use NDP. After the parameter is specified, it remains in the validity period until the session ends or you change the parameter value.
You can run EXPLAIN to check whether a statement uses NDP. If the statement uses NDP, the Extra column of EXPLAIN output contains the NDP pushdown execution plan. More specifically, the NDP execution plan usually starts with "Using pushed NDP" followed by the NDP type, such as condition, columns, or aggregate.
- Using pushed NDP condition: The common format is ('database_name','table_name','column_name' predicate_condition). The content in the brackets indicates the filter condition expression that is pushed down.
- Using pushed NDP column: Columns are tailored based on NDP.
- Using pushed NDP aggregate: An aggregation operation is performed based on NDP.
In the following example, when ndp_mode is set to on, the condition statement (l_receiptdate >= date '2021-8-30') of the LINEITEM table is executed on the storage layer.
Enabling NDP
mysql> set ndp_mode=on;
The following examples show NDP execution types.
Disabling NDP
mysql> set ndp_mode=off;
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