|
|
|
Re: Can we replace any sub query using join [message #661778 is a reply to message #661777] |
Sat, 01 April 2017 02:59 |
|
Michel Cadot
Messages: 68694 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Quote:Say in the above table if your TABLEB has large number of rows and you can join with TABLEA instead of subquery however your performance of query will degrade using joins.
This is not correct.
If your statistics are up to date, Oracle will transparently convert your query to the other one if it thinks it is better.
And it will convert IN to EXISTS (or the opposite) for the same reason; this depends on row numbers, indexes...
It will even remove the IN/EXISTS if a foreign key constraint exists between the 2 tables.
|
|
|