Skip to main content

Introducing the Query Optimizer

  • Chapter
  • First Online:
Book cover Troubleshooting Oracle Performance
  • 790 Accesses

Abstract

The query optimizer is one of the building blocks of the SQL engine. Its purpose is to produce efficient execution plans in a timely manner. The time constraint is essential because in most situations it isn’t sensible to spend too much time on the optimization phase. What does “too much time” mean? In general, the parse phase, which contains the work performed by the query optimizer, should be much shorter than the execution phase. The only situation in which having a parse phase longer than the execution phase is acceptable is when a cursor can be reused for many executions. As discussed in Chapter 2, the ability to cache the shared SQL area associated with a cursor in the SGA was also introduced for this very same purpose.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A select-project-join query block is made up of three basic operations: a selection that extracts rows fulfilling specific predicates, a projection that extracts specific columns from the referenced tables, and a join that puts together data extracted from several tables. Filter and join predicates are based on simple operators like equalities. Example: SELECT t1.id, t2.n FROM t1 JOIN t2 ON t1.id = t2.id WHERE t1.n = 42.

  2. 2.

    By default the _convert_set_to_join initialization parameter is set to FALSE.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Christian Antognini

About this chapter

Cite this chapter

Antognini, C. (2014). Introducing the Query Optimizer. In: Troubleshooting Oracle Performance. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-5759-2_6

Download citation

Publish with us

Policies and ethics