Oracle sql high-performance tuning 2nd edition
Sizing the Host Computer. Essential Considerations for Database Configuration. Sizing the SGA. Multithreaded Servers. Parallel Query Processes.
Evaluating Operating System Performance. Recognizing Oracle Database Bottlenecks. Introduction This book is about tuning Oracle databases and applications with an emphasis on the tuning of SQL statements.
Tuning SQL is not the only way to tune an application: The design of an application will often dictate its performance limits, and tuning the physical layout of an Oracle database can be critical to reaching those limits. It is common for the performance of an Oracle application to appear to be acceptable during development only to degrade abruptly when the application encounters production data volumes or transaction rates. While this may result from a number of causes, inefficient SQL that fails to maintain good performance as data volumes increase is a major factor.
Poorly performing SQL arises in applications for a number of reasons. Although SQL is a relatively easy language to learn, its nonprocedural nature tends to obscure performance-related issues. Additionally, there seems to be insufficient awareness of the need to monitor carefully and tune SQL performance, and the tools and techniques needed to tune SQL are not sufficiently well known. These databases are often extremely large and are subject to a great deal of ad hoc query activity.
If the SQL that supports these queries is inefficient, then queries may take hours or even days to complete or may fail to complete at all. When Oracle applications start to underperform, it's typical for performance experts to be called in to perform benchmark tests or tune the Oracle database engine. During these tuning exercises it is usually that apparent the SQL contained within the application is the most important factor in determining performance.
If the SQL can be tuned, then performance increases of percent or more are not uncommon. But there is a dilemma: By the time performance problems are recognized, it is often difficult to make changes to the production SQL. Furthermore, performance experts usually don't have the application knowledge required to understand and tune the SQL, while the developers don't have the necessary understanding of SQL performance tuning.
It follows that the best way to improve substantially the performance of most Oracle applications is to improve the efficiency of the application SQL. To make this happen, developers needed to acquire SQL tuning skills together with a commitment to tuning. The objective of this book is to provide SQL programmers with the theory and practice of SQL tuning together with hints and guidelines for optimizing specific SQL statement types.
We'll see how to diagnose and correct problems with existing SQL and briefly explore performance issues beyond SQL tuning, such as application design and server tuning. By following the guidelines in this book, SQL programmers should be able to write SQL that will perform well both in development and in production and will be able to detect and correct inefficiencies in existing SQL. The result will be SQL that performs to its peak potential. There is a need, and the basis for this need lies in two fundamental imperfections in all alternative tuning guides: They are aimed almost exclusively at database administrators DBAs , and they gloss over the processes of tuning SQL statements.
There is a need for a book that is aimed not at the administrators of the Oracle databases, but at those writing the access routines that is, the SQL for the database, such as application developers, users of data warehouses, and others whose work involves writing high-performance SQL. Additionally, while tuning the database engine can help poorly performing applications, nothing can match improving the efficiency of SQL for getting massive performance improvements.
Rather, this is a book for anyone who needs to write SQL that has a performance requirement. Few people read a book of this type from beginning to end. Depending on your background, you may wish to skip sections that review database theory and jump right into the details of SQL tuning. This section contains a review of the importance of SQL tuning, an overview of the tuning process and a review of SQL.
The chapters in Part I are as follows:. Chapters in Part II introduce a number of important topics, such as the role of the query optimizers, indexing and hashing concepts, SQL parsing, basic data retrieval strategies, and tools for explaining and tuning SQL execution. Although Part II is heavy on theory, its difficult to tune SQL successfully without at least a broad understanding of these topics.
All readers are therefore encouraged to read this section. While it will be useful to read Part III from start to finish, it may also be used as a reference. You may wish to consult the relevant portions of this section as appropriate tuning requirements arise. Chapters in Part III are as follows:. At the beginning of the application life cycle, effective database and application design can define the constraints that will ultimately determine the limits on your SQL's performance.
The appendices contain details of configuring client programs and the Oracle server for specific circumstances, a reference guide, and a guide to further reading and other resources. This database is not intended to illustrate good or bad data modeling principles but to be a basis for illustrating a wide range of SQL statements.
You can find an export of one of the variations of this database at the book's website. The sample database implements a simple and familiar business schema containing Customers, Employees, Products, and Sales. In addition, the database contains the results from an imaginary marketing survey in the Subjects and Scores table. Many different physical implementations of this logical schema were implemented during the development of the book.
For instance, the Sales table was subjected to a variety of partitioning schemes, the Customer table was represented in one example as an Index-Organized table, while Subject and Score data were represented in a variety of ways including nested tables, Varrays, and object tables. Many of the examples contained in this book are accompanied with a graphical illustration of the performance gains that can be achieved by various optimizations.
These performance measurements were collected on a range of computer hardware, ranging from a high-end UNIX host to a Pentium laptop. Since writing the first edition of this book, I have had the pleasure to work with Quest Software in the development of software that assists in the tuning of SQL and Oracle databases. I have also been heavily involved in the development of Quest's Spotlight on Oracle product, which implements the database tuning philosophies outlined in the final chapters of this book.
Because I'm so familiar with Quest products and believe that they make substantial contributions to SQL tuning, I often refer to them in the text of the book. However, be warned that I'm a Quest employee and hardly unbiased when it comes to Quest products.
I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time. Pearson Education, Inc. This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site.
Please note that other Pearson websites and online products and services have their own separate privacy policies. To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:.
For inquiries and questions, we collect the inquiry or question, together with name, contact details email address, phone number and mailing address and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.
Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.
Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law. If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information informit.
On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information.
However, these communications are not promotional in nature. We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form. Pearson automatically collects log data to help ensure the delivery, availability and security of this site.
We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources. Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site.
While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information.
The information gathered may enable Pearson but not the third party web trend services to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.
This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser.
Disabling or blocking certain cookies may limit the functionality of this site. Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.
Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time. If a user's personally identifiable information changes such as your postal address or email address , we provide a way to correct or update that user's personal data provided to us.
This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service informit. Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list s simply visit the following page and uncheck any communication you no longer want to receive: www.
While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest pearson. California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice.
The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services. This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information.
This privacy statement applies solely to information collected by this web site. Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information. We may revise this Privacy Notice through an updated posting.
We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way.
Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions. Building Database Clouds in Oracle 12c. Add To My Wish List. Book Sorry, this book is no longer in print. Not for Sale. Sample Content Table of Contents I.
Introduction to SQL Tuning. Review of SQL. SQL Processing Internals. The Optimizer. Indexing and Clustering.
Bitmap Indexes. Index Organized Tables. Tracing and Explaining SQL. Tuning Table Access. Tuning Joins and Subqueries. Sort Operations. Aggregate Operations. SET Operations. Parallel SQL. Optimizing DML. VLDB and Warehousing. Materialized Views and Snapshots. Searching for a Selective Value in an Unselective Column. Unintentionally Disabling an Index With a Function. Functional Indexes. Choosing the Best Indexing Strategy.
Types of Index Retrievals. Using Concatenated Indexes. Index Merges. Searching for Ranges. Optimizing Bitmap Index Access. Optimizing Hash Clusters. Optimizing Index Organized Tables. Optimizing Full Table Scans. Optimizing for the First Row. Choosing the Best Join Method. Optimizing the Join. Special Joins. Sort Operations. Aggregate Operations. SET Operations. Understanding Parallel SQL. Using Parallel Query. Tuning Parallel Query. Examples of Parallel Queries. Other Parallel Operations.
General Optimizations. Optimizing Transactions. Parallel DML. Materialized Views and Snapshots. Computationally Intensive Routines. Database-Intensive Routines. Cursor Handling. Avoid Autocommit. Using Oracle Datatypes. Bind Variables. Cursor Management.
Array Processing. Performance Comparisons for Object Types. Optimizing Views. Distributed SQL. Distributed Joins. Optimizing Data Definition Language. Building Tuning into the Design Process. Establishing an Efficient Physical Model. Application Design. A Review of the Oracle Architecture. Sizing the Host Computer. Essential Considerations for Database Configuration.
Sizing the SGA. Multithreaded Servers. Parallel Query Processes. Evaluating Operating System Performance. Recognizing Oracle Database Bottlenecks. Pearson offers affordable and accessible purchase options to meet the needs of your students.
Connect with us to learn more. Currently a product architect at Quest Software, Harrison has conducted many Oracle training seminars and has authored several articles for the Oracle Technical Journal. He resides in Australia. We're sorry!
0コメント