I just observed that a query can have different execution plans when it runs as an anonymous plsql and runs in a store procedure.
select * from da_discography_intf t where exists (select null from album where album_id = t.album_id) and not exists (select null from album where album_name <> t.album_name)
When in anonymous plsql, it uses anti-hash, but it uses nest loop when in store procedure.
After I give it a 'ALL_ROWS' hint, it started to use 'anti-hash join'.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment