Hi TheShowMeCanuck
Don’t kill the message-boy because you don’t like the message.
Try to go through all the material on AskTom website (
at Oracle – you can’t find any information about the solution.
I don’t know your system so I can’t give you a solution. However I can say this:
I understand you – what do you do then the manager is yelling and walking around with a shotgun looking after the guilty developer/dba? – You remove the problem FAST – however you did not solve the problem and you can (properly) optimize the database.
In the long run you might get more problems (it’s like turning a pyramid upside down). Then you build more and more into the database, the problems gets worse. Then your RBS growth a lot (or you use very large RBS) then remember that Oracle use these RBS for read consistency – so Oracle get slower then RBS is full with “before rows”.
My point is, you must make the decision if you want to continue or redesign. As I see it, you have lots of data and rows – fine. If I understand you reply your script only return insignificant numbers of rows of the total numbers of rows.
Why not change the behavior of the script. Why not make it easier for the script to find/build the rows. You can set a flag on interesting rows (maybe using bitmap index), you can save primary key info to a special table then rows are changed). Use materialized views or you can instead of using one large session build an automatic job (DMBS_JOB) to periodic pre-update/find/do the whole script and reduce long running scripts to a minimum (I have done it with great success) or try if you can make the script works in parallel. You can do several thinks but try to avoid crossing committed rows.
Maybe you problem is not the script.
The idea of using temporary tables (it’s not necessary temporary tables – but just for this script) you avoid crossing committed rows so Oracle avoids using RBS. The advance is that you can do lots of stuff on the temp tables with commit – and not long running transactions. The idea of breaking the script down with commit gives you a change to see status and so on from a “manager” console (other session) and following the script and you do not generate lots of RBS. Then I am doing this coding I am also building error-table for bugs. I avoid using FETCH (cursor) and try hard to use pure DML statements. Then every thing is acceptable few massive update/insert/merge statements update normal tables. Sometimes the customer needs to install more disks in san because we else run out of space – but the alternative is ….
I try hard to avoid the problem than to live with the problem.
Regards
Allan