Database Reference
In-Depth Information
Allow the undo tablespace to grow by giving it the room to extend and increasing the undo
retention. This decreases the likelihood of an undo segment transaction table slot being
overwritten during the course of your long-running query. This is the same as the solution
for the other cause of an ORA-01555 error (the two are very much related; you experience undo
segment reuse during the processing of your query). In fact, I reran the preceding example
with the undo tablespace set to autoextend 1MB at a time, with an undo retention of
900 seconds. The query against the table BIG completed successfully.
Reduce the runtime of your query—tune it. This is always good if possible, so it might be the
first thing you try.
Summary
In this chapter, we explored redo and undo and took a look at what they mean to the developer. I've mostly presented
here situations or conditions you should be on the lookout for, since it is actually the DBAs or SAs who must correct
these issues. The key point to take away from this chapter is the importance of redo and undo, and the fact that they
are not overhead—they are integral components of the database and are necessary and mandatory. Once you have a
good understanding of how they work and what they do, you'll be able to make better use of them. Understanding that
you are not “saving” anything by committing more frequently than you should (you are actually wasting resources, as
it takes more CPU, more disk, and more programming) is probably the most important point of all. Be aware of what
the database needs to do, and then let the database do it.
 
Search WWH ::




Custom Search