Access 2003 DBを使用していて、そのパフォーマンスを向上させたいと考えています。昨日、実行プラン(Show Plan)に関する記事を読み、今日、このクエリに対してshowPlanを実行しました。
SELECT tb_bauteile_Basis.*
FROM tb_bauteile_Basis
ORDER BY tb_bauteile_Basis.Name;
Name
フィールドにインデックスを付けて、そのクエリプランを表示します。
Inputs to Query -
Table 'tb_bauteile_Basis'
Using index 'Name'
Having Indexes:
Name 1553 entries, 17 pages, 1543 values
which has 1 column, fixed
ID 1553 entries, 4 pages, 1553 values
which has 1 column, fixed, clustered and/or counter
- End inputs to Query -
01) Scan table 'tb_bauteile_Basis'
Using index 'Name'
次に、からインデックスを削除しましName
た。新しいクエリプランは次のとおりです。
- Inputs to Query -
Table 'tb_bauteile_Basis'
Using index 'PrimaryKey'
Having Indexes:
PrimaryKey 1553 entries, 4 pages, 1553 values
which has 1 column, fixed, unique, clustered and/or counter, primary-key, no-nulls
Plauskomponente 1553 entries, 4 pages, 3 values
which has 1 column, fixed
Name 1553 entries, 17 pages, 1543 values
which has 1 column, fixed
ID 1553 entries, 4 pages, 1553 values
which has 1 column, fixed, clustered and/or counter
- End inputs to Query -
01) Scan table 'tb_bauteile_Basis'
Using index 'PrimaryKey'
これらの2つのクエリプランをどのように解釈する必要がありますか?
つまり、2番目のショープランでは、のインデックスを作成する必要がPlauskomponente,Name,ID
あり、これら3つのフィールドの複合インデックスを作成する必要がありますか?複合インデックスを作成する必要があるかどうかをどのように判断できますか?
そして、なぜPlauskommponente
最初のショープランに表示されないのですか?