The query optimizer is the component of a database management system that attempts to determine the most efficient way to execute a query. The optimizer considers the possible query plans for a given input query, and attempts to determine which of those plans will be the most efficient. Cost-based query optimizers assign an estimated "cost" to each possible query plan, and choose the plan with the smallest cost.

PropertyValue
dbpprop:abstract
  • The query optimizer is the component of a database management system that attempts to determine the most efficient way to execute a query. The optimizer considers the possible query plans for a given input query, and attempts to determine which of those plans will be the most efficient. Cost-based query optimizers assign an estimated "cost" to each possible query plan, and choose the plan with the smallest cost. Costs are used to estimate the runtime cost of evaluating the query, in terms of the number of I/O operations required, the CPU requirements, and other factors determined from the data dictionary. The set of query plans examined is formed by examining the possible access paths (e.g. index scan, sequential scan) and join algorithms. The search space can become quite large depending on the complexity of the SQL query. Generally, the query optimizer cannot be accessed directly by users: once queries are submitted to database server, and parsed by the parser, they are then passed to the query optimizer where optimization occurs. However, some database engines allow guiding the query optimizer with hints.
  • Der Anfrageoptimierer ist Teil eines Datenbankmanagementsystems, der für eine Datenbankanfrage einen optimalen Ausführungsplan berechnet. Der Optimierer verwendet für seine Entscheidungen statistische Erfahrungswerte über die gespeicherten Daten und versucht, die Kosten zu minimieren. Abhängig davon können Operationen umgeordnet oder verschiedene Implementierungen einer Operation ausgewählt werden. Falls mehr als zwei Tabellen verknüpft werden (join), gibt es mehrere Wege, dies zu tun. Beispiel mit 3 Tabellen A, B und C (A * B) * C A * (B * C) (A * C) * B Der Abfrageoptimierer versucht nun, möglichst wenige Zeilen bei den Zwischenergebnissen entstehen zu lassen. Die Verwendung eines Index kann die Auswahl von Datensätzen enorm beschleunigen. Dies lohnt sich aber nur, wenn die Anzahl der ausgefilterten Datensätze niedrig ist; andernfalls führt ein Full Table Scan schneller zum Ziel. Der Anfrageoptimierer versucht auch, die IO-Zugriffe, d.h. die Zugriffe auf den Sekundärspeicher, zu optimieren, da das unnötige Nachladen ausgelagerter Blöcke ebenso zu Leistungseinbußen führen kann. Der Grund hierfür liegt darin, dass der Sekundärspeicher (Festplatte) um einen großen Faktor langsamer ist als der Hauptspeicher.
  • クエリ最適化(クエリさいてきか、英: query optimization)は、多くのデータベース管理システム (DBMS) の持つ機能であり、クエリ (データに対する問い合わせ) を実行する最も効率的な方法を決定する。クエリオプティマイザ(query optimizer)とも言う。クエリオプティマイザは、入力されたクエリについて考えられるクエリ実行計画群を評価し、どれが最も効率的か決定する。コストに基づいたクエリオプティマイザでは、個々の計画のコストを見積もり、最もコストの低い計画を選ぶ。コストはクエリ実行時コストであり、入出力(I/O)操作数、CPU時間、その他から決定する。評価されるクエリ実行計画群は、可能なアクセス経路(例えば、インデックス検索、シーケンシャル検索)と結合アルゴリズム(例えば、ソートマージ結合、ハッシュ結合、入れ子ループ)の組み合わせから生成される。探索空間は入力されたSQLクエリによっては非常に大きくなる可能性もある。 クエリ最適化をユーザーが直接操作することはできない。クエリがデータベースサーバ に対して発行され、パーサーが構文解析すると、その結果がクエリオプティマイザに送られ、クエリ最適化が行われる。 関係代数#問い合わせ最適化も参照。
dbpprop:date
  • January 2009
dbpprop:hasPhotoCollection
dbpprop:reference
dbpprop:wikiPageUsesTemplate
rdf:type
rdfs:comment
  • The query optimizer is the component of a database management system that attempts to determine the most efficient way to execute a query. The optimizer considers the possible query plans for a given input query, and attempts to determine which of those plans will be the most efficient. Cost-based query optimizers assign an estimated "cost" to each possible query plan, and choose the plan with the smallest cost.
  • Der Anfrageoptimierer ist Teil eines Datenbankmanagementsystems, der für eine Datenbankanfrage einen optimalen Ausführungsplan berechnet. Der Optimierer verwendet für seine Entscheidungen statistische Erfahrungswerte über die gespeicherten Daten und versucht, die Kosten zu minimieren. Abhängig davon können Operationen umgeordnet oder verschiedene Implementierungen einer Operation ausgewählt werden. Falls mehr als zwei Tabellen verknüpft werden (join), gibt es mehrere Wege, dies zu tun.
rdfs:label
  • Query optimizer
  • Anfrageoptimierer
  • クエリ最適化
owl:sameAs
skos:subject
foaf:page
is dbpprop:redirect of
is owl:sameAs of