Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

lxmlhhMar 7 2016 — edited Mar 7 2016

Version is Oracle Database 11g Enterprise Edition Release 11.2.0.3.

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.

1.jpg

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

2.jpg

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

Why?

Comments

Can you please have a look at the VS Code Windowing options to see if any of them do what you want?
In the VS Code menu, select View->Editor Layout

User_ZZQ0F

Everytime I run query I use shortcut Ctrl+Alt+Right to split pane.
Would be nice to do make it automatically.

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 4 2016
Added on Mar 7 2016
6 comments
4,236 views