05.11.2015 Views

Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

230<br />

CHAPTER 6 ■ LOCKING AND LATCHING<br />

Summary<br />

This chapter covered a lot of material that, at times, may have made you scratch your head.<br />

While locking is rather straightforward, some of its side effects are not. However, it is vital that<br />

you underst<strong>and</strong> these issues. For example, if you were not aware of the table lock <strong>Oracle</strong> uses<br />

to enforce a foreign key relationship when the foreign key is not indexed, then your application<br />

would suffer from poor performance. If you did not underst<strong>and</strong> how to review the data<br />

dictionary to see who was locking whom, you might never figure that one out. You would just<br />

assume that the database “hangs” sometimes. I sometimes wish I had a dollar for every time I<br />

was able to solve the insolvable hanging issue by simply running the query to detect unindexed<br />

foreign keys <strong>and</strong> suggesting that we index the one causing the problem—I would be<br />

very rich.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!