This content has been marked as final. Show 2 replies
Hi1 person found this helpful
Have you tried running this outside of APEX? I would guess that you would still have the same problem.
This is really a tuning request that might be best addressed in the SQL & PL/SQL forum (there is a FAQ at the top of the forum that will tell you how best to post tuning requests.
Here's a quick idea though, look up the DRIVING_SITE hint.
My guess is that 'Inv_in_apps' is actually a function and not a procedure. Depending on your data, you may benefit from results caching.
Can't really help much more without seeing an explain plan etc.
I'd agree whole-heartedly with Ben here - running queries over dblinks can be a bit of a minefield TBH and best avoided if at all possible.1 person found this helpful
One thing: If the data you are querying is relatively static (changes infrequently) or is updated on regular schedule (e.g. once per day, hour etc.) and is generally read-only in nature, it might be worth exploring the use of Materialized views which allows you to replicate a data-set locally, thus effectively eliminating the need to query across databases - their use in this context is beyond the scope of the APEX forum, however.