Chapter 29. Tuning PL/SQL

Contrary to the opinion of C programmers everywhere, tuning is not simply a matter of eking the last bit of performance out of a program by condensing a five-line sequence of commands down to one super-dense statement. Instead, tuning is more a state of mind: good performance is a natural consequence of clean, well-designed programs. It is not an afterthought. If you’ve been using what you’ve learned from this book, particularly about packages, in your PL/SQL code, you’re well on your way to developing high-performance PL/SQL programs.

Having said all that, there’s still a lot you can do to improve your PL/SQL programs. Once of the most interesting aspects of PL/SQL tuning stems from the fact that PL/SQL, unlike C or COBOL, lives and executes inside the database. Consequently, you must carefully manage how your programs move in and out of memory, and how they interact with competing processes. On a less esoteric front, you must also make sure that your programs don’t do unnecessary work and that they effectively use algorithms, SQL, and data structures. This chapter tests your ability to apply these concepts.

Beginner

29-1.

True or false?

  1. A fast program is as important as a correct one.

  2. Shorter programs (in terms of lines of code) are faster than longer programs.

  3. You can’t optimize a program without first identifying performance bottlenecks.

  4. Performance is the most important aspect of high-quality software.

  5. Tuning is part of the testing process.

  6. Tuning PL/SQL is ...

Get Oracle PL/SQL Programming: A Developer's Workbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.