Rohit Shetty
06/11/2026, 5:02 AMRocky
06/11/2026, 5:03 AMENABLE_EXCHANGE_PASS_THROUGH (or enable_exchange_pass_through) is a session variable in StarRocks that controls an optimization for data shuffling (Exchange nodes).
What it does
When enabled (true), it allows the Exchange operator to operate in "Passthrough" mode.
• In a distributed query, Exchange nodes are responsible for moving data between different BE (Backend) nodes.
• Passthrough mode reduces the CPU and memory overhead of these operations by allowing data to be transmitted more directly, often bypassing certain internal buffering or serialization steps when the data doesn't require complex redistribution or processing at that specific stage.
• This is particularly useful for improving performance in high-concurrency or high-throughput scenarios where network and CPU efficiency are bottlenecks.
Persistence across sessions
Whether the setting persists depends on the scope you used when setting it via the MySQL interface:
1. Session Scope (Default):
sql
SET enable_exchange_pass_through = true;
If you set it like this, it will NOT persist across sessions. The setting applies only to your current connection and will be lost once you disconnect.
2. Global Scope:
sql
SET GLOBAL enable_exchange_pass_through = true;
If you set it with the GLOBAL modifier, the change will persist for all new sessions created after the command is run. Note that it does not affect currently active sessions. In StarRocks, global variables are persisted in the FE (Frontend) metadata, so they remain in effect even after a cluster restart.
3. User Property Scope (Optional):
You can also bind session variables to a specific user so they persist every time that user logs in:
sql
ALTER USER 'username' SET PROPERTIES ("session.enable_exchange_pass_through" = "true");
Summary:
• SET ... = Current session only (not persistent).
• SET GLOBAL ... = Persistent for all future sessions and across restarts.
References
• sql-reference/System_variable.md
• administration/management/BE_configuration.md
• administration/management/FE_configuration.md
• data_source/data_cache.mdRohit Shetty
06/11/2026, 5:05 AMRocky
06/11/2026, 5:06 AMENABLE_EXCHANGE_PASS_THROUGH (set it to false), StarRocks turns off an optimization used during the data shuffling (Exchange) phase of a query.
What happens when it is disabled?
1. Reverts to Standard Path: Instead of attempting to transmit data "directly" to target nodes (bypassing certain internal buffers and serialization steps), the data follows the standard, more conservative transmission path.
2. Increased Overhead: Disabling it typically leads to higher CPU and Memory usage on the Backend (BE) nodes during shuffles. This is because the system may perform additional buffering and redistribution steps that the passthrough mode is designed to avoid.
3. Disables Passthrough Buffering: In query profiles, you will see that "Passthrough" metrics (like PassThroughBufferPeakMemoryUsage) will either be zero or absent, as the specialized passthrough buffer is no longer being utilized.
4. Use Case: You would typically only disable this for troubleshooting. If you encounter rare RPC errors, memory spikes specifically in exchange nodes, or stability issues during heavy shuffles, turning this off can help determine if the optimization is the cause.
Persistence across sessions
As with most StarRocks session variables, persistence depends on how you set it:
* Temporary (Session):
sql
SET enable_exchange_pass_through = false;
This applies only to your current connection. Once you log out, the setting is lost.
* Persistent (Global):
sql
SET GLOBAL enable_exchange_pass_through = false;
This persists across FE restarts and applies to all new sessions. Existing sessions will not be affected until they reconnect.
* User-Specific (Persistent):
sql
ALTER USER 'username' SET PROPERTIES ("session.enable_exchange_pass_through" = "false");
This ensures that every time this specific user logs in, the variable is set to false.
Recommendation: In most production environments, you should keep this enabled (true) unless instructed by support to disable it for debugging.
References
• sql-reference/System_variable.md
• administration/management/monitoring/metrics.md
• administration/management/BE_configuration.mdRohit Shetty
06/11/2026, 5:06 AMRocky
06/11/2026, 5:06 AMenable_exchange_pass_through (or any system variable) in StarRocks, you can use the following methods:
1. Using SHOW VARIABLES (Recommended)
This is the most common way to check variable settings.
* To check the value for your current session:
sql
SHOW VARIABLES LIKE 'enable_exchange_pass_through';
* To check the global default value:
sql
SHOW GLOBAL VARIABLES LIKE 'enable_exchange_pass_through';
2. Using SELECT @@ Syntax
You can also query the value directly like a standard MySQL-compatible variable:
* Current session value:
sql
SELECT @@enable_exchange_pass_through;
* Global value:
sql
SELECT @@global.enable_exchange_pass_through;
3. Querying information_schema
If you need to query variables as part of a larger dataset or for monitoring scripts:
sql
SELECT * FROM information_schema.session_variables
WHERE VARIABLE_NAME = 'enable_exchange_pass_through';
Summary of what you are seeing:
* Value is 1 or `true`: The optimization is ON.
* Value is 0 or `false`: The optimization is OFF.
Note: If you see different values between the session and global checks, the session value is what currently applies to your active queries. Any queries you run in this specific connection.
References
• sql-reference/sql-statements/cluster-management/config_vars/SHOW_VARIABLES.md
• sql-reference/System_variable.md
• sql-reference/information_schema/session_variables.md
• sql-reference/information_schema/global_variables.md
References
• sql-reference/sql-statements/cluster-management/config_vars/SHOW_VARIABLES.md
• sql-reference/information_schema/session_variables.md
• sql-reference/information_schema/global_variables.md
• sql-reference/System_variable.md
• sql-reference/information_schema/verbose_session_variables.md