To enable merge joins server-wide, set enable sort-merge joins and JTC to 1. The default value is 0, which means that merge joins are not considered. When this value is set to 1, merge joins and join transitive closure are considered for equijoins. If merge joins are disabled at the server level, they can be enabled for a session with set sort_merge.
Join transitive closure can be enabled independently at the session level with set jtc on.
See “Enabling and disabling join transitive closure”.
The configuration parameter is dynamic, and can be reset without restarting the server.