6 Replies Latest reply on Mar 7, 2016 12:43 PM by Stefan Koehler

    hint 'leading' 'ordered' issue when using 'count(distinct xxx)'


      Version is Oracle Database 11g Enterprise Edition Release

      When I join two tables use hash, and use 'leading' hint, it shows as below, t_userserviceinfo is drive table, i think it is ok even its cardinality is lagerer.



      But when I query using 'count(distinct a.phonenumber)', leading drive table changed to t_personallib, it is not the table I specified.


      I thought the drive table should be always the table a as I specified using 'leading(a)'.