I just found out (by accident) that you can use the
NO_MERGE
optimizer hint in two ways:
- either in the surrounding query, where you're referencing the subquery (or view) that is not to be merged (here you've to add an argument specifying which subquery/view you mean)
- or in the query itself that is not to be merged (here you use the hint without an argument)
I've used only the first approach til now, but the latter is most useful too (eg. if you've a view that you want not to be merged anywhere in your application's queries ... using the second syntax you don't have to include the hint in all the queries where you use the view).
Comments
Thanks!