Poor Query Performance Due To Sort-Merge Join (Doc ID 444609.1)

Last updated on MAY 23, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 10.2.0.4 [Release 9.2 to 10.2]
Information in this document applies to any platform.
Information in this document applies to any platform.

Goal

Query performs badly because of Sort-Merge Join.

When the pga_aggregate_target is increased, then the optimizer would favour for SM join which could be time consuming. So it is better to disable the SM join so that the optimizer would not favour SM joins in any circumstances.

SM Join can be disabled using the following parameter:

"_optimizer_sortmerge_join_enabled"

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms