For faster navigation, this Iframe is preloading the Wikiwand page for クエリ実行計画.

クエリ実行計画

クエリ実行計画(くえりじっこうけいかく)とは、ユーザが発行した問い合わせに基づきデータベース管理システム (DBMS) が内部的に生成する情報であり、これによりDBMSの行うデータ処理がプログラム的に表される。[注釈 1]

DBMSはクエリ実行計画の生成にあたりクエリ最適化の処理を行い、最も効果的に処理できると判断されたクエリ実行計画を問い合わせから導き出す。

クエリ実行計画はDBMSがその機能を実現するための内部的な情報に過ぎないが、ユーザがチューニングを行うとき手がかりとなる情報を提供するために、多くのDBMSが実行計画の表示機能を提供する。

例としてApache Derbyの実行計画を以下に示す。

Statement Name:
        null
Statement Text:
        SELECT Country FROM Countries WHERE Region = 'Central America'
Parse Time: 10
Bind Time: 0
Optimize Time: 370
Generate Time: 10
Compile Time: 390
Execute Time: 0
Begin Compilation Timestamp : 2005-05-25 09:20:41.274
End Compilation Timestamp : 2005-05-25 09:20:41.664
Begin Execution Timestamp : 2005-05-25 09:20:41.674
End Execution Timestamp : 2005-05-25 09:20:41.674
Statement Execution Plan Text:
Project-Restrict ResultSet (2):
Number of opens = 1
Rows seen = 6
Rows filtered = 0
restriction = false
projection = true
        constructor time (milliseconds) = 0
        open time (milliseconds) = 0
        next time (milliseconds) = 0
        close time (milliseconds) = 0
        restriction time (milliseconds) = 0
        projection time (milliseconds) = 0
        optimizer estimated row count:           11.90
        optimizer estimated cost:           69.35

Source result set:
        Table Scan ResultSet for COUNTRIES at read committed isolation level
using instantaneous share row locking chosen by the optimizer
        Number of opens = 1
        Rows seen = 6
        Rows filtered = 0
        Fetch Size = 16
                constructor time (milliseconds) = 0
                open time (milliseconds) = 10
                next time (milliseconds) = 0
                close time (milliseconds) = 0
                next time in milliseconds/row = 0

        scan information:
                Bit set of columns fetched={0, 2}
                Number of columns fetched=2
                Number of pages visited=3
                Number of rows qualified=6
                Number of rows visited=114
                Scan type=heap
                start position:
null            stop position:
null            qualifiers:
Column[0][0] Id: 2
Operator: =
Ordered nulls: false
Unknown return value: false
Negate comparison result: false

                optimizer estimated row count:           11.90
                optimizer estimated cost:           69.35

注釈

[編集]
  1. ^ ここでプログラム的に表されるとは、プログラムが実行計画に単純に従うことにより、実行計画が表すデータ処理を行えることを意味する。
{{bottomLinkPreText}} {{bottomLinkText}}
クエリ実行計画
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?