Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Hom to force optimizer to use certaim index when doing update?
On Tue, 04 Nov 1997 22:13:09 GMT, tkyte_at_us.oracle.com (Thomas Kyte) wrote:
>On Tue, 04 Nov 1997 23:15:20 GMT, dtang_at_minn.net wrote:
>
>>Hi:
[snip]
>
>btw: the first query probably would have failed in real execution. Without the
>predicate on TableA, every row in A would have to have a match in TableB else
>the subquery would return zero rows but a subquery used with equals must return
>at least one and at most one row. The update would fail on the first row in A
>that didn't have a match in B.
>
Sorry, the above statement is wrong. The first query would have *worked* but the results probably would not be what you expected. If the subquery returned ZERO rows, field_1 in A would be set to NULL (which is probably NOT what you would have wanted).
The other part of the answer (use the predicate) was correct though.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
NOTICE: In order to cut down on the amount of time I spend applying silly logic to email addresses like "In order to cut down on spam, remove THIS from my email" or "In order to cut down on spam, reverse my email address", etc, I will simply hit delete when that mail bounces back to me, which is what I do with spam myself.
I haven't figured out whats more time consuming for me, deleting spam or resending emails after re-reading the whole thing to figure out the algorithm to apply. Received on Wed Nov 05 1997 - 00:00:00 CST
![]() |
![]() |