My Oracle Support Banner

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

Last updated on JANUARY 19, 2021

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 10.2.0.4 [Release 9.2 to 10.2]
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.