Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Advanced PL/SQL Developer Professional Guide

You're reading from   Oracle Advanced PL/SQL Developer Professional Guide Master advanced PL/SQL concepts along with plenty of example questions for 1Z0-146 examination with this book and ebook

Arrow left icon
Product type Paperback
Published in May 2012
Publisher Packt
ISBN-13 9781849687225
Length 440 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Saurabh K. Gupta Saurabh K. Gupta
Author Profile Icon Saurabh K. Gupta
Saurabh K. Gupta
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Oracle Advanced PL/SQL Developer Professional Guide
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Overview of PL/SQL Programming Concepts FREE CHAPTER 2. Designing PL/SQL Code 3. Using Collections 4. Using Advanced Interface Methods 5. Implementing VPD with Fine Grained Access Control 6. Working with Large Objects 7. Using SecureFile LOBs 8. Compiling and Tuning to Improve Performance 9. Caching to Improve Performance 10. Analyzing PL/SQL Code 11. Profiling and Tracing PL/SQL Code 12. Safeguarding PL/SQL Code against SQL Injection Attacks Answers to Practice Questions Index

Chapter 8, Compiling and Tuning to Improve Performance


Question No.

Answer

Explanation

1

a and b

Interpreted compilation mode is preferred when a program unit is in development stage and involves SQL statement processing.

2

c and d

The Real Native compilation method removes the dependency on C compiler to generate DLL for the program unit. Instead, the native DLLs are stored in the database dictionary itself. As the DLLs are stored in the dictionary, they can be a part of the normal backup and recovery.

3

b

The PLSQL_OPTIMIZE_LEVEL value set to 3 strictly inlines all the subprograms at high priority.

4

b and c

The PLSQL_CODE_TYPE value specified during recompilation of a program overrides the current system or session settings. Its default value is INTERPRETED and it must be updated in the spfile instance after the database upgrade process. In real native mode, the libraries are stored in the SYSTEM tablespace.

5

a and c

Usage of BULK COLLECT can pull multi-row data from the database in a single attempt, thus reducing context switches. PLS_INTEGER is a preferred data type in arithmetic calculations.

6

d

Inlining of subprograms is only supported at optimization level greater than one.

7

b and c

The F_ADD local function would be called inline because its call has been marked inline using PRAGMA INLINE. It might also be considered for inlining as the PLSQL_OPTIMIZE_LEVEL value is 2.

8

b

The DLLs generated from the Real Native compilation are stored in the SYSTEM tablespace.

9

a and d

The NOT NULL data types add overhead to check every assignment for nullity. L_SUM must be declared as

L_SUM NATURAL;

Usage of appropriate data types to avoid implicit typecasting improves performance. L_ID must be declared as NUMBER.

10

a, c, and d

PRAGMA INLINE works for PLSQL_OPTIMIZE_LEVEL values 2 and 3. At level 1, the Oracle optimizer doesn't consider any subprogram for inlining. At level 3, all subprograms are strictly called for inline. However, inlining of a subprogram can be set off by specifying PRAGMA INLINE (<Function name>,'NO').

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image