|
-
That's where explain plan, and tuning your query come into play. Odds are your biggest gains will come from tuning the query, but there's not much I can say without knowing more about it.
Time the actual query alone in sqlplus or a dummy procedure, find out how much of the 60 seconds it uses.
If the Query takes 50 seconds, and the rest of it takes 10 seconds, even if changing the loop to use exceptions instead of the select/if statement doubles performance, you're still only saving 5 seconds. On the other hand if you make the query go twice as fast you save 25 seconds. You need to break down and time individual stages of the procedure to see which sections take the largest ammounts of time and concentrate on those first.
After you find out how long the query is, run explain plan to see how it's working. Read about using explain plan in the oracle documentation. Make sure it's using indexes (or even has indexes to work with), etc. I'm not an expert SQL tuner but that's a good place to start. If you want, post the results here and I, or someone more qualified will be glad to help.
Make sure to do some work and learn/understand what you're doing. As the saying goes, give a man a fish and he'll eat for a day. Teach a man to fish and he'll eat forever. Or something :)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|