I'm new to the concept of using the hint optimizer in oracle and I would like to understand if I'm using the hint FULL properly
I have a query
SELECT COUNT(*) FROM MyTable
WHERE MyTable.name='RandomName'
So let's say the result got me 12345
Now if I want to use the hint FULL , is that how it supposed to be written below ?
SELECT /*+ FULL(e) */ count(*)
FROM MyTable e
WHERE MyTable.name='RandomName'
The result is also 12345 is that normal?
Thank you
Yes, this is how would specify a hint to Oracle. In this case, it should result in a Full Table Scan (not using any index you may have on the name
column).
And the result will of course be the same. If using indexes changed the result, it would make them pretty useless.