My Oracle Support Banner

From10Gr2, HASH UNIQUE Operation Returns Results in UNSORTED ORDER by Default (Doc ID 341838.1)

Last updated on FEBRUARY 14, 2019

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 10.2 to 11.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata 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.
This problem can occur on any platform.


From 10gR2, executing SELECT DISTINCT with default options may not utilize a SORT UNIQUE, rather a HASH UNIQUE may be used causing results to be returned in UNSORTED order.

Setting optimizer_features_enable="9.2.0" reverts to the previous behavior:

SQL> alter session set optimizer_features_enable="9.2.0";


Upgrade  and earlier release to 10g Release 2 and above.


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

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